views:

157

answers:

1

Not sure how I fixed it, or if I did. might have just been taking forever for the dns to get resolved or something, but it works now. Apparently even though the site I listed below showed everything pointing to the right address, something somewhere wasn't resolving properly. --------- original message --------------- I'm not sure what has gone wrong here, but I've been trying to get a subdomain set-up, and i can't get it to resolve.

I've checked that the domain is set-up properly by typing the url into this site http://www.selfseo.com/find_ip_address_of_a_website.php to check that the subdomain is pointing to the correct server, and it returns my server ip (I also checked a subdomain not set-up, and it doesn't resolve, so that site does work).

So, now i'm figuring the problem must be in my apache config file.

The virtual host details are like this

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html
    ServerName mysite.com
    ErrorLog logs/mysite-error_log
    CustomLog logs/mysite-access_log common
</VirtualHost>
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/liveTest
    ServerName liveTest.mysite.com
    ErrorLog logs/mysitetest-error_log
    CustomLog logs/mysitetest-access_log common
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !\.(php|html|css|js|gif|png|jpe?g)$
    RewriteRule (.*)$ /index.php [L]
</VirtualHost>

i restarted the server, and I get nothing, but going to http://mysite/liveTest works, so the directory structure is all correct.

Any idea what I've got wrong here?

A: 

Do you have < VirualHost *:80 > < /VirtualHost> surrounding each of the two code blocks? <-- ok, you have that.

Then have you checked the logs? Maybe try to remove the Rewriting in the second URL, to eliminate possible error sources.

Torandi