HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   openSuse10.2, ISPConfig, no PHP (http://www.howtoforge.com/forums/showthread.php?t=10715)

latcarf 19th February 2007 21:20

openSuse10.2, ISPConfig, no PHP
 
Hopefully I have posted this in the right place now... previously I was trying to work through a problem here Transferring Hard Drive to new System.

Since my last post there I started from scratch with opensuse10.2 and the Perfect Setup for opensuse10.2. This time I did not perform the steps that indicated I would install ISPConfig at the end of the HowTo which I did not do. I loaded one of my sites and sure enough I was able to access PHP pages with no problems.

This leads me to believe that the issue is not with opensuse as some tried to convince me before. I don't believe the issue is with ISPConfig either, however I do believe there is something in the process of installing ISPConfig that is preventing my PHP pages from being accessed.

I like ISPConfig and would like to figure out why this is happening so I can continue to use it. :-) Since I reinstalled opensuse10.2 I don't have anymore of the files from the previous install. Still some information in the thread I linked above though.

Can we try to figure this out? It could be as simple as ISPConfig not setting my sites up under /srv/www/htdocs (I am thinking about the apache2 error log in the other thread... and that is where I loaded my site after this new install) but if that is the reason why didn't it? how do I fix it?

martinfst 19th February 2007 21:25

The installation procedure of ISPConfig modifies the PHP settings for Apache(2). It removes the standard allowed php execution. Otherwise you could not select to switch php on or off for a website. If you want to run PHP, you have to set the PHP tick box for every website you want php to work on. Maybe you created a website yourself in the main apache2.conf? If that's true, you should leave the creation of sites and apache configurations to ISPconfig. Just thinking out loud.

latcarf 19th February 2007 22:27

Hi, thanks for replying!
Quote:

Originally Posted by martinfst
The installation procedure of ISPConfig modifies the PHP settings for Apache(2). It removes the standard allowed php execution. Otherwise you could not select to switch php on or off for a website. If you want to run PHP, you have to set the PHP tick box for every website you want php to work on.

Yes, while I don't know the actual process I was aware it did this. I have been through the setup twice with PHP checked for the applicable sites. There was even remedy in the previous thread I linked that indicates not to check the boxes therefore preventing ISPConfig from altering PHP configurations but that did not work either.
Quote:

Originally Posted by martinfst
Maybe you created a website yourself in the main apache2.conf? If that's true, you should leave the creation of sites and apache configurations to ISPconfig. Just thinking out loud.

Probably not, I did not mess with the apache configs except where directed by the Perfect Setup for opensuse10.2. I did set up the sites via ISPConfig on the previous tries but again when I access the sites from the internet I could not access any PHP pages or content. On my last install of opensuse10.2 without installing ISPConfig I still didn't mess with the apache config files. I simply copied all the files for a site directly into /srv/www/htdocs and as I said when I tried to access PHP content it worked with no problem.

With ISPConfig installed, sites up, this is the appache2 error I receive when I tried to access PHP content
Code:

[Sun Feb 18 17:52:29 2007] [error] [client ::1] Directory index forbidden by Options directive: /srv/www/htdocs/
which is why I am thinking maybe ISPConfig should be setting the sites up in /srv/www/htdocs/ instead of /srv/www/. I am willing to give it a try but I do not know where/what to change in ISPConfig to do this.

till 19th February 2007 22:53

Please copy your websites to the website root directories that ISPConfig creates for your site and not in the default suse directory.

latcarf 19th February 2007 23:17

Quote:

Originally Posted by till
Please copy your websites to the website root directories that ISPConfig creates for your site and not in the default suse directory.

I did, web1, web2, web3 etc... correct? ISPConfig also generated directories with the site domain names and when I placed the files in the root directories they were copied into the domain directories also by ISPConfig I assume.

Each time I tried the setup with ISPConfig an ls of /srv/www/ would look like this
Code:

cgi-bin htdig htdoc perl-lib web1 web2 web3 www.thefractalfarm.net www.latcarfproductions.com www.heartwinds.org

till 20th February 2007 07:48

Quote:

I did, web1, web2, web3 etc... correct? ISPConfig also generated directories with the site domain names and when I placed the files in the root directories they were copied into the domain directories also by ISPConfig I assume.
ISPConfig is not copying any files in the websites. You will have to upload your files to the web directory of the website. Example:

/srv/www/www.thefractalfarm.net/web/

Quote:

Each time I tried the setup with ISPConfig an ls of /srv/www/ would look like this
Thats perfect, exactly as it should be.

latcarf 20th February 2007 18:47

Quote:

Originally Posted by till
ISPConfig is not copying any files in the websites. You will have to upload your files to the web directory of the website. Example:

/srv/www/www.thefractalfarm.net/web/



Thats perfect, exactly as it should be.

I have done this, on the system that is currently in use and on the new one I am trying to setup. The latter being the one we are discussing.

Maybe "copying" isn't the correct term? Either way if I move (or copy) the files to

/srv/www/www.thefractalfarm.net/web/

they also appear in the directory

/srv/www/web1/web/

without me having to copy or move them there. It seems to work vise-versa also. I have no doubt I am putting the files where they need to be.

As I said before I tried it last without ISPConfig and I was able to access PHP content. I am in the process of doing a clean install again with ISPConfig and will see what happens then.

martinfst 20th February 2007 19:31

That's the intended behavioral. www.thefractalfarm.net is a symbolic link to web1 in the directory /srv/www. Do
Code:

ls -l /srv/www
and you'll see what I mean. Both names are the same. Something like a nickname.

latcarf 20th February 2007 21:32

Okay... after a complete clean reinstall of opensuse10.2 I once again have no access to PHP content or files. :mad:

Per Falko's request in another thread; "What's the output of ifconfig"
Code:

server:~ # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:40:CA:6F:A5:F6
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::240:caff:fe6f:a5f6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3232 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5073805 (4.8 Mb)  TX bytes:377765 (368.9 Kb)
          Interrupt:177 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:305 errors:0 dropped:0 overruns:0 frame:0
          TX packets:305 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:242146 (236.4 Kb)  TX bytes:242146 (236.4 Kb)

and "what's in Vhosts_ispconfig.conf?"
Code:

###################################
#
# ISPConfig vHost Configuration File
#        Version 1.0
#
###################################
#
NameVirtualHost 192.168.2.2:80
<VirtualHost 192.168.2.2:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.latcarfproductions.com:80
######################################
#
#
<VirtualHost 192.168.2.2:80>
ServerName www.latcarfproductions.com:80
ServerAdmin webmaster@latcarfproductions.com
DocumentRoot /srv/www/web1/web
ServerAlias latcarfproductions.com
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/ /srv/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/www/web1/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /srv/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web1/phptmp/
php_admin_value session.save_path /srv/www/web1/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/srv/www/web1/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web1/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.heartwinds.org:80
######################################
#
#
<VirtualHost 192.168.2.2:80>
ServerName www.heartwinds.org:80
ServerAdmin webmaster@heartwinds.org
DocumentRoot /srv/www/web2/web
ServerAlias heartwinds.org
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/ /srv/www/web2/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/www/web2/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /srv/www/web2/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web2/phptmp/
php_admin_value session.save_path /srv/www/web2/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/srv/www/web2/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web2/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.thefractalfarm.net:80
######################################
#
#
<VirtualHost 192.168.2.2:80>
ServerName www.thefractalfarm.net:80
ServerAdmin webmaster@thefractalfarm.net
DocumentRoot /srv/www/web3/web
ServerAlias thefractalfarm.net
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/ /srv/www/web3/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /srv/www/web3/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php3>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php4>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
<Files *.php5>
    SetOutputFilter PHP
    SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /srv/www/web3/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web3/phptmp/
php_admin_value session.save_path /srv/www/web3/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/srv/www/web3/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /srv/www/web3/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /srv/www/web3/user/$1/web/$3
</VirtualHost>
#
#
#

Is Other Post this referring to changing Vhosts_ispconfig.conf? and is it done via console or direct input? I can see similar lines above in my vhost_ispconfig.conf file that specify AddType versus AddHandler.

and what file are we changing here?
Code:

2. You add these lines in the "Apache directives" field manually:

AddHandler application/x-httpd-php .php4
AddHandler application/x-httpd-php .php5
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .php4s
AddHandler application/x-httpd-php-source .php5s
AddHandler application/x-httpd-php-source .phps

((these are the lines copied from the original SUSE Apache2 config)).

from here

till 20th February 2007 21:42

Please have a look here:

http://www.howtoforge.com/forums/sho...light=10.2+php


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

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