Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 how to configure apache as a test server, not real machine?
Google
Post new topic Reply to topic
Author Message
wojtek
 
 


Joined: 16 Nov 2006
Posts: 7

PostPosted: Thu Nov 16, 2006 10:59 pm Reply with quoteBack to top

I want to set the conf files for the testing server. not real server. just for examining my web sites. With no real IP. Is it possible? What to do?
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Fri Nov 17, 2006 6:31 pm Reply with quoteBack to top

limit everything to 127.0.0.1 or localhost.

For example in your httpd.conf change
Listen 80
to
Liste 127.0.0.1:80

There is a domain change tool in the apache2triadcp, you can use that.
View user's profileSend private messageYahoo MessengerICQ Number
wojtek
 
 


Joined: 16 Nov 2006
Posts: 7

PostPosted: Fri Nov 17, 2006 6:57 pm Reply with quoteBack to top

Very Happy Thanks Josh.
As far as i Know, I am to create my own virtual contener, define its name in etc\hosts file and what, change something in the directory directive?
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Fri Nov 17, 2006 10:49 pm Reply with quoteBack to top

Add your test server name to your hosts file having it resolve to 127.0.0.1
As long as your server is listening on 127.0.0.1:80 (or anything that resolves to it). You don't have to have the allow / deny rules in your httpd.conf to limit it to only localhost.

Example to allow from 127.0.0.1
Quote:
<Directory "C:/somefoldername>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>


Personally I just password protect some folders that I want to be private using an .htaccess folder
Quote:

AuthType Basic
AuthName "Restricted Access"
AuthUserFile C:\apache2triad\htdocs\.htpasswd

#Require valid-user
#Require user root

<LIMIT GET POST>
require valid-user
</LIMIT>
View user's profileSend private messageYahoo MessengerICQ Number
Vlad Alexa Mancini
lead developer
lead developer


Joined: 07 Jul 2003
Posts: 1539

PostPosted: Fri Nov 17, 2006 10:51 pm Reply with quoteBack to top

the default apache2triad configuration is that of a partly local server

i say partly because some servers like apache are set to bind on 0.0.0.0 that is all available interfaces , if you have more than a loopback like it is generally the cause some servers will be available remotely

you can prevent all remote access by configuring everything explicitely to bind on the loopback interface that is 127.0.0.1/localhost

also on a default windows there is no need to modify hosts file for the localhost mapping to be available for 127.0.0.1

more explicitely the loopback works as 127.0.0.1 and AFAIK can not be disabled , but for the "localhost" (mapping/alias/hostname if you will) of 127.0.0.1 to be available a
Quote:
127.0.0.1 localhost
line must be present in system32\drivers\etc\hosts , and it is present by default
View user's profileSend private message
wojtek
 
 


Joined: 16 Nov 2006
Posts: 7

PostPosted: Fri Nov 17, 2006 10:59 pm Reply with quoteBack to top

Laughing works smoothly. thanks
View user's profileSend private message
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT