Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jan 19, 2012 5:44 pm 
Offline
Newbie

Joined: Thu Jan 19, 2012 5:33 pm
Posts: 2
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>

_________________
"I wear a hat."


Top
   
 Post subject:
PostPosted: Thu Jan 19, 2012 8:03 pm 
Offline
Newbie

Joined: Thu Jan 19, 2012 5:33 pm
Posts: 2
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.

_________________
"I wear a hat."


Top
   
 Post subject:
PostPosted: Thu Jan 19, 2012 8:09 pm 
Offline
Senior Member

Joined: Mon Dec 20, 2010 11:37 pm
Posts: 76
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/


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group