Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache config help from behind router 1

Status
Not open for further replies.

natbrazil

Technical User
Jun 5, 2003
3
US
hi all,
setup: small network running winxp behind a linksys router with perm ip #

apache, php and mysql sucessfully installed

info on configuring router to forward tc/pip '80' requests to the particular machine has been found and seems correctly done by me, info here:


goal: run local host as my main server and as a virtual server

i've tried many configs, some with erros some without, but none of them work

can anyone please give me an example on how to do this

ps: i manage a small hosting network of similar setup but without the router, with no problems, so i suspect my config doesn't account for the router somehow

thanks!!!!!!
 
Apache doesn't know and doesn't care about your router. As long as you have http traffic forwarded to your server's lan ip, that is all you need. (note: If you use dhcp on the lan side, assign an ip address outside of the addreess range the router uses for dhcp or the ip for the server will keep changing and that is not good.) :) I am not sure what you mean by this:

goal: run local host as my main server and as a virtual server

If you do NOT plan on hosting more than one domain, you don't need to use virtual hosts. If you use vhosts, then "Main" will never be served. The first vhost defined becomes the default. All directives in the main section are globally defined. That means they all apply to each of the vhosts unless your redefine them inside your vhost containers. To use name based vhost addressing, you just need to check a few things:

NameVirtualHost * (you need this for name based addressing)
UseCanonicalName Off (some distros need this inside each vhost container)

ServerName (you MUST have this inside each vhost container)
DocumentRoot path/to/your/html/pages (iside each vhost container)

You can use just about any directive in the main section in your vhost containers and/or directory containers but if you use the sample virtual host in httpd.conf, you should be fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top