I have domain and it works with index.php. I also have a sub domain (mail.example.com) and virtual host setup in apache (apache2). The virtual host tells it to look in the htdocs/mail folder for the index page. The mail server i have uses a index.php page. I can not get it to load this page. If i change it to index.html and put some reg html stuff in it it works. In the httpd.conf i have already checked the DirectoryIndex. It reads: DirectoryIndex index.php index.html index.html.var. Any thoughts on why it wont load php pages for sub domains will help 🙂

TIA
Wanted420

EDIT:
Here is what my virtualhost look like in httpd.conf:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin webmaster@bitphire.com
DocumentRoot "/Program Files/Apache Group/Apache2/htdocs"
ServerName www.bitphire.com
ServerAlias bitphire.com
ErrorLog logs/bitphire-error_log
CustomLog logs/bitphire.com-access_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@bitphire.com
DocumentRoot "/Program Files/Apache Group/Apache2/htdocs/mail"
ServerName mail.bitphire.com
ErrorLog logs/mail.bitphire-error_log
CustomLog logs/mail.bitphire-access_log common
</VirtualHost>

mail.bitphire.com is looking in htdocs not htdocs/mail

    6 years later
    wanted420;10526673 wrote:

    I have domain and it works with index.php. I also have a sub domain (mail.example.com) and virtual host setup in apache (apache2). The virtual host tells it to look in the htdocs/mail folder for the index page. The mail server i have uses a index.php page. I can not get it to load this page. If i change it to index.html and put some reg html stuff in it it works. In the httpd.conf i have already checked the DirectoryIndex. It reads: DirectoryIndex index.php index.html index.html.var. Any thoughts on why it wont load php pages for sub domains will help 🙂

    TIA
    Wanted420

    EDIT:
    Here is what my virtualhost look like in httpd.conf:

    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerAdmin webmaster@bitphire.com
    DocumentRoot "/Program Files/Apache Group/Apache2/htdocs"
    ServerName www.bitphire.com
    ServerAlias bitphire.com
    ErrorLog logs/bitphire-error_log
    CustomLog logs/bitphire.com-access_log common
    </VirtualHost>

    <VirtualHost *:80>
    ServerAdmin webmaster@bitphire.com
    DocumentRoot "/Program Files/Apache Group/Apache2/htdocs/mail"
    ServerName mail.bitphire.com
    ErrorLog logs/mail.bitphire-error_log
    CustomLog logs/mail.bitphire-access_log common
    </VirtualHost>

    mail.bitphire.com is looking in htdocs not htdocs/mail

    ok do you have php properly configured in your httpd.conf file? sounds like its not being you can get something going with html but not php.

    this would be accomplished by setting the directory and alias up for php. then adding the tags in for like addtype and addhandler. hope this helps.

      sounds like php is not configured with directory and alias. as well as the addtype and addhandler.

        Write a Reply...