Subdomains and VirtualHost
For example,
Currently, three of the four work, all but saimoe.tldranimu.net. I have two entries in sites-enabled, default and tldranimu. I could not get blog.zerosubspace.com working in default, but when I enter it in httpd.conf it works. Repeating that process does not work for saimoe.tldranimu.net. Both are set up in DNS Manager properly, so my guess is I am missing the point in configuration files in Apache2.
Possible someone could point me in the right (or proper) direction? Thanks.
default
<virtualhost *:80="">ServerAdmin webmaster@zerosubspace.com
ServerName zerosubspace.com
ServerAlias zerosubspace.com *.zerosubspace.com
DocumentRoot /var/www
<directory>Options FollowSymLinks
AllowOverride None</directory>
<directory var="" www="">Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all</directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "="" usr="" lib="" cgi-bin"="">AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all</directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<directory "="" usr="" share="" doc="">Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128</directory></virtualhost>
tldranimu
<virtualhost *:80="">ServerAdmin webmaster@zerosubspace.com
ServerName tldranimu.net
DocumentRoot /var/www/tldranimu
<directory>Options FollowSymLinks
AllowOverride None</directory>
<directory var="" www="">Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all</directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<directory "="" usr="" lib="" cgi-bin"="">AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all</directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<directory "="" usr="" share="" doc="">Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128</directory></virtualhost>
<virtualhost *:80="">ServerName saimoe.tldranimu.net
DocumentRoot /var/www/tldrsaimoe</virtualhost>
httpd.conf
<virtualhost *:80="">ServerName blog.zerosubspace.com
DocumentRoot /var/www/blog</virtualhost>
<virtualhost *:80="">ServerName saimoe.tldranimu.net
DocumentRoot /var/www/tldrsaimoe</virtualhost>
2 Replies
Incidentally though, should the subdomain VH's go in httpd.conf? I'm familiar with how things worked in Apache 1.1 but it seems like those should have worked in their respective site files in 2.
There are some Include in apache2.conf, one of them is:
# Include the virtual host configurations:
Include sites-enabled/