Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th November 2005, 20:01
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default Can't turn of PHP for vhost

I have ispconfiog installed and tackled my mail problems and my DNS sub-domain issues but PHP doesn't work for vhosts.

I uploaded to the correct directories, changed the default behaviour not to show the dir listing (-Indexes) etc. But if I want PHP for the 2 vhosts I have configured I need to turn PHP on globally. And yes I used the tick box in the site config and can see the result in the vhost file. No play though...

My vhost file(s) seem to be correct etc but PHP files are parsed as plain text files to my browser.

have a look at http://www.djerk.nl/info.php if you like

Regards,
Djerk
Reply With Quote
Sponsored Links
  #2  
Old 5th November 2005, 21:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

So you turned on PHP for www.djerk.nl in ISPConfig?

Is it possible that the name of the default Apache web site (before you installed ISPConfig) is also www.djerk.nl? Then change the ServerName directive for that default web site.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 5th November 2005, 21:18
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default Yes I did turn on PHP for djerk.nl

Right I'm searching for where I should change this, any pointers?

djerk.nl wasn't there before ispconfig but it is the domain of the server itself so in a sense yes you're right.

Thinking about the above I must add that another site (DNS isn't moved yet) on the same server has the same problem. Resolving djerk.nl being caught by the main apache config instead of a vhost config would mean that the other domain should be working...

I'm at my wits end...

Last edited by dmgeurts; 5th November 2005 at 22:35.
Reply With Quote
  #4  
Old 6th November 2005, 10:55
SleeperZ SleeperZ is offline
Junior Member
 
Join Date: Oct 2005
Posts: 23
Thanks: 0
Thanked 2 Times in 1 Post
Default

Its prolly somewhere in /etc/apache2/sites-enabled/000-default.

If its not there I'd do a grep - ~$ grep -lR "djerk" /etc/apache2/ - this will tell you all the places in the apache2 directory and down that it the term djerk shows up.

Hopefully this helps in tracking down the issue.
Reply With Quote
  #5  
Old 6th November 2005, 15:44
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

It must be somewhere but I have no idea. I did a search for any file containing djerk.nl but didn't find anything I'd not seen before.

this is /etc/apache2/sites-available (symlinked to sites-enabled/000-default)

Code:
NameVirtualHost *
<VirtualHost *>
        ServerAdmin webmaster@djerk.nl

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options -Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
                # This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # RedirectMatch ^/$ /web1/web/
        </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 /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On

    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>
All help appreciated btw so thx falco & SleeperZ

Code:
suzy:/etc/apache2# grep -lR "ServerName" /etc/
/etc/ssl/openssl.cnf
/etc/apache2/sites-available/web1.djerk.nl
/etc/apache2/sites-available/web2.geurtscass.com
/etc/apache2/sites-enabled/web1.djerk.nl
/etc/apache2/sites-enabled/web2.geurtscass.com
/etc/apache2/vhosts/Vhosts_ispconfig.conf
/etc/apache2/vhosts/Vhosts_ispconfig.conf~
/etc/proftpd.conf.orig
/etc/proftpd.conf
All apache2 files seem correct to me so I'm probably wrong... web1 is the 1st virtual host web2 the second.

Vhosts_ispconfig.conf:
Code:
suzy:/etc/apache2# more /etc/apache2/vhosts/Vhosts_ispconfig.conf
###################################
# ISPConfig vHost Configuration File
#         Version 1.0
###################################
NameVirtualHost 217.195.248.251:80
######################################
# Vhost: www.djerk.nl:80
######################################
<VirtualHost 217.195.248.251:80>
ServerName www.djerk.nl:80
ServerAdmin webmaster@djerk.nl
DocumentRoot /var/www/web1/web
ServerAlias djerk.nl ftp.djerk.nl
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm 
default.htm
ScriptAlias  /cgi-bin/ /var/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php> ... (code ommitted)

Last edited by dmgeurts; 6th November 2005 at 15:54.
Reply With Quote
  #6  
Old 6th November 2005, 16:17
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Might a duplicate section of ###ispconfig_log### cause any trouble? It does explain to me why the vhost file is read twice. only just noticed...

Code:
suzy:/etc/apache2# /usr/sbin/apache2 -S      
[Sun Nov 06 16:11:30 2005] [warn] NameVirtualHost 217.195.248.251:80 has no VirtualHosts
VirtualHost configuration:
217.195.248.251:80     is a NameVirtualHost
         default server www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.geurtscass.com (/etc/apache2/vhosts/Vhosts_ispconfig.conf:69)
         port 80 namevhost www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.geurtscass.com (/etc/apache2/vhosts/Vhosts_ispconfig.conf:69)
wildcard NameVirtualHosts and _default_ servers:
*:*                    is a NameVirtualHost
         default server localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/web1.djerk.nl:1)
         port * namevhost www.geurtscass.com (/etc/apache2/sites-enabled/web2.geurtscass.com:1)
Syntax OK
After correcting the double entry:

Code:
suzy:/etc/apache2# /usr/sbin/apache2 -S
VirtualHost configuration:
217.195.248.251:80     is a NameVirtualHost
         default server www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.geurtscass.com (/etc/apache2/vhosts/Vhosts_ispconfig.conf:69)
wildcard NameVirtualHosts and _default_ servers:
*:*                    is a NameVirtualHost
         default server localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/web1.djerk.nl:1)
         port * namevhost www.geurtscass.com (/etc/apache2/sites-enabled/web2.geurtscass.com:1)
Syntax OK
Now how do I set the default server to a subdomain of the domain assigned to a vhost

Last edited by dmgeurts; 6th November 2005 at 16:35.
Reply With Quote
  #7  
Old 6th November 2005, 16:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

What's in /etc/apache2/sites-available/web1.djerk.nl?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #8  
Old 6th November 2005, 17:15
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Code:
<VirtualHost *>
        ServerName www.djerk.nl
        ServerAlias djerk.nl
        ServerAdmin webmaster@djerk.nl

        DocumentRoot /var/www/web1/web
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </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 /var/www/web1/log/apache2.error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/www/web1/log/apache2.access.log combined
        ServerSignature On

    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>
I must admit, I noticed I'd uncommented the servername here. Reinstating it does not help but does change the following output slightly:

Code:
suzy:/etc/apache2# /usr/sbin/apache2 -S
VirtualHost configuration:
217.195.248.251:80     is a NameVirtualHost
         default server www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.geurtscass.com (/etc/apache2/vhosts/Vhosts_ispconfig.conf:69)
wildcard NameVirtualHosts and _default_ servers:
*:*                    is a NameVirtualHost
         default server localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost www.djerk.nl (/etc/apache2/sites-enabled/web1.djerk.nl:1)
         port * namevhost www.geurtscass.com (/etc/apache2/sites-enabled/web2.geurtscass.com:1)
Syntax OK

Last edited by dmgeurts; 6th November 2005 at 17:20.
Reply With Quote
  #9  
Old 6th November 2005, 18:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Can you change ServerName in /etc/apache2/sites-available/web1.djerk.nl to something that does not conflict with the web sites in ISPConfig (e.g. server.djerk.nl)? Don't forget to restart Apache.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 6th November 2005, 19:40
dmgeurts dmgeurts is offline
Junior Member
 
Join Date: Nov 2005
Location: Netherlands
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

The result is:
Code:
suzy:/etc/apache2# /usr/sbin/apache2 -S
VirtualHost configuration:
217.195.248.251:80     is a NameVirtualHost
         default server www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.djerk.nl (/etc/apache2/vhosts/Vhosts_ispconfig.conf:16)
         port 80 namevhost www.geurtscass.com (/etc/apache2/vhosts/Vhosts_ispconfig.conf:73)
wildcard NameVirtualHosts and _default_ servers:
*:*                    is a NameVirtualHost
         default server localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost localhost.localdomain (/etc/apache2/sites-enabled/000-default:2)
         port * namevhost test.djerk.nl (/etc/apache2/sites-enabled/web1.djerk.nl:1)
         port * namevhost www.geurtscass.com (/etc/apache2/sites-enabled/web2.geurtscass.com:1)
Syntax OK
Browser test:
www.djerk.nl - now gives an error (404) which is good as there's nothing to serve
test.djerk.nl - behaves serves the info.php file as plain txt
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP: Turn relative links into absolute ones? xtothez Programming/Scripts 6 25th November 2008 16:51
[error] an unkown filter was not added: PHP Arien Installation/Configuration 12 7th October 2006 14:17
Installation Problems right after php building nagual Installation/Configuration 3 31st October 2005 10:28
Installation Problems right after php building nagual Installation/Configuration 1 31st October 2005 08:30
Apache + PHP lola Server Operation 1 25th April 2005 13:41


All times are GMT +2. The time now is 04:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.