 |
Linode Forum Linode Community Forums
|
| Author |
Message |
deltax20a
Joined: 19 Jan 2012
Posts: 2
|
| Posted: Thu Jan 19, 2012 4:44 pm Post subject: Subdomains and VirtualHost |
|
|
So in setting up my two domains today in Apache2 I am trying to configure VirtualHosts to point two domains and two sub-domains to several WP blogs installed and running.
For example, www.zerosubspace.com is my primary domain, blog.zerosubspace.com goes to my main blog
www.tldranimu.net goes to my second blog on the same server, and saimoe.tldranimu.net will point to the third blog on the same server
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
Code:
<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
Code:
<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
Code:
<VirtualHost *:80>
ServerName blog.zerosubspace.com
DocumentRoot /var/www/blog
</VirtualHost>
<VirtualHost *:80>
ServerName saimoe.tldranimu.net
DocumentRoot /var/www/tldrsaimoe
</VirtualHost>
|
|
| Back to top |
|
deltax20a
Joined: 19 Jan 2012
Posts: 2
|
| Posted: Thu Jan 19, 2012 7:03 pm Post subject: |
|
|
Apparently it was just the DNS falling behind, everything works now.
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. |
|
| Back to top |
|
drpks
Joined: 20 Dec 2010
Posts: 55
|
| Posted: Thu Jan 19, 2012 7:09 pm Post subject: |
|
|
Delete vhosts from httpd.conf.
There are some Include in apache2.conf, one of them is:
Code: # Include the virtual host configurations:
Include sites-enabled/
|
|
| Back to top |
|
| |
|