Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Can't View Subdomain Subdirectories [SOLVED] |
|
Author |
|
JustKia
Joined: 16 Jul 2010 Posts: 2
|
Posted: Fri 16 Jul '10 18:50 Post subject: Can't View Subdomain Subdirectories [SOLVED] |
|
|
Having been offline for sometime I decided that now would be a good time to upgrade everything!
Apache 2.2.15; php 5.3.2; MySQL 5.1.48 on Vista Home Premium (dons fire proof suit).
I pretty much copied my virtual hosts config from the old to new conf files.
Code: | <VirtualHost *:80>
ServerAdmin admin@mysite.com
DocumentRoot G:/mysite
ServerName www.mysite.com
ServerAlias mysite.com
ErrorLog logs/mysite/error_log
TransferLog logs/mysite/transfer_log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@mysite.com
DocumentRoot G:/blog
ServerName blog.mysite.com
ServerAlias blog.mysite.com
ErrorLog logs/blog/error_log
TransferLog logs/blog/transfer_log
</VirtualHost>
<VirtualHost *:80>
ServerAdmin admin@mysite.com
DocumentRoot G:/example
ServerName www.example.com
ServerAlias example.com
ErrorLog logs/example/error_log
TransferLog logs/example/transfer_log
</VirtualHost> |
I can access www.mysite.com and www.example.com just fine.
I can access blog.mysite.com/index.php but not blog.mysite.com/wp-admin/index.php
It appears that Apache is looking for "mysite.com/wp-admin/index.php" instead, which doesn't exist.
It's the same story with any subdirectories of subdomains.
Could someone give me a gentle shove in the right direction please?
Edit to add:
After some more playing around I've discovered that I can see .html files in the subdirectories of subdomains but not .php files.
However, I can access test.php Code: | <?php phpinfo(); ?> |
So, that probably means that this post is now in the wrong forum. If so would some kindly mod please move it to the correct forum please?
Last edited by JustKia on Mon 19 Jul '10 15:04; edited 1 time in total |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 19 Jul '10 11:01 Post subject: |
|
|
Did you set up php over fcgid or as module? I'm missing the <Directory> in the vhosts. Did you configure it outside? |
|
Back to top |
|
JustKia
Joined: 16 Jul 2010 Posts: 2
|
Posted: Mon 19 Jul '10 15:04 Post subject: |
|
|
Thanks for the reply.
Php is set up as a module and that module is loaded in Apache.
Directories are configured outside of the vhost - rather than defining the same things multiple times (ie in each vhost) I configure the directory containing the vhosts.
I finally figured out the cause and solution last night.
It's a MySQL issue, not php or Apache. There seems to be a need to define the DB_HOST as '127.0.0.1' rather than 'localhost', even though 127.0.0.1 is defined as localhost within the hosts file. |
|
Back to top |
|
|
|
|
|
|