Sign in to follow this  
Followers 0
BINREV SPYD3R

HPR - HPR1206: Resolving Issues (The Vhost Config File)

1 post in this topic

Windigo helps NYbill as he trys to set up mutiple servers on his VPS by explaining the

stucture of the vhost file.

NameVirtualHost *:80

#this first virtualhost enables: http://127.0.0.1, or: http://localhost,

#to still go to /srv/http/*index.html(otherwise it will 404_error).

#the reason for this: once you tell httpd.conf to include extra/httpd-vhosts.conf,

#ALL vhosts are handled in httpd-vhosts.conf(including the default one),

# E.G. the default virtualhost in httpd.conf is not used and must be included here,

#otherwise, only domainname1.dom & domainname2.dom will be accessible

#from your web browser and NOT http://127.0.0.1, or: http://localhost, etc.

#

DocumentRoot "/srv/http"

ServerAdmin root@localhost

ErrorLog "/var/log/httpd/127.0.0.1-error_log"

CustomLog "/var/log/httpd/127.0.0.1-access_log" common

DirectoryIndex index.htm index.html

AddHandler cgi-script .cgi .pl

Options ExecCGI Indexes FollowSymLinks MultiViews +Includes

AllowOverride None

Order allow,deny

Allow from all

ServerAdmin your@domainname1.dom

DocumentRoot "/home/username/yoursites/domainname1.dom/www"

ServerName domainname1.dom

ServerAlias domainname1.dom

DirectoryIndex index.htm index.html

AddHandler cgi-script .cgi .pl

Options ExecCGI Indexes FollowSymLinks MultiViews +Includes

AllowOverride None

Order allow,deny

Allow from all

ServerAdmin your@domainname2.dom

DocumentRoot "/home/username/yoursites/domainname2.dom/www"

ServerName domainname2.dom

ServerAlias domainname2.dom

DirectoryIndex index.htm index.html

AddHandler cgi-script .cgi .pl

Options ExecCGI Indexes FollowSymLinks MultiViews +Includes

AllowOverride None

Order allow,deny

Allow from all

Go to this episode

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0