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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th October 2012, 14:42
gbr gbr is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ERROR 403 - Forbidden! PHP PAGES

Hi all.

Sorry for my english.

I have instaled isconfig 3 on a debian 6.

All works fine, ftp , dns , mail , web ....

But when i tried to execute a php page, i got this error.

ERROR 403 - Forbidden!.

In the error LOG i got this:

[Thu Oct 18 13:10:28 2012] [error] [client 80.**.49.**] client denied by server configuration: /var/www/***.es/web/gon.php

and the .vhost conf apache look this.

Code:
<Directory /var/www/servidorweb.gonetaplicaciones.es>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost *:80>
      DocumentRoot /var/www/servidorweb.gonetaplicaciones.es/web

    ServerName servidorweb.gonetaplicaciones.es
    ServerAlias www.servidorweb.gonetaplicaciones.es
    ServerAdmin webmaster@servidorweb.gonetaplicaciones.es

    ErrorLog /var/log/ispconfig/httpd/servidorweb.gonetaplicaciones.es/error.log

    Alias /error/ "/var/www/servidorweb.gonetaplicaciones.es/web/error/"
    ErrorDocument 400 /error/400.html
    ErrorDocument 401 /error/401.html
    ErrorDocument 403 /error/403.html
    ErrorDocument 404 /error/404.html
    ErrorDocument 405 /error/405.html
    ErrorDocument 500 /error/500.html
    ErrorDocument 502 /error/502.html
    ErrorDocument 503 /error/503.html

    <IfModule mod_ssl.c>
    </IfModule>

    <Directory /var/www/servidorweb.gonetaplicaciones.es/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client0/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>



    # suexec enabled
    <IfModule mod_suexec.c>
      SuexecUserGroup web1 client0
    </IfModule>
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    </FilesMatch>
    # php as fast-cgi enabled
        # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
    <IfModule mod_fcgid.c>
        IdleTimeout 300
        ProcessLifeTime 3600
        # MaxProcessCount 1000
        DefaultMinClassProcessCount 0
        DefaultMaxClassProcessCount 100
        IPCConnectTimeout 3
        IPCCommTimeout 360
        BusyTimeout 300
    </IfModule>
    <Directory /var/www/servidorweb.gonetaplicaciones.es/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    <Directory /var/www/clients/client0/web1/web>
        AddHandler fcgid-script .php .php3 .php4 .php5
        FCGIWrapper /var/www/php-fcgi-scripts/web1/.php-fcgi-starter .php
        Options +ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>


    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web1 client0
    </IfModule>

    <IfModule mod_dav_fs.c>
          # Do not execute PHP files in webdav directory
      <Directory /var/www/clients/client0/web1/webdav>
            <FilesMatch "\.ph(p3?|tml)$">
          SetHandler None
        </FilesMatch>
      </Directory>
      DavLockDB /var/www/clients/client0/web1/tmp/DavLock
      # DO NOT REMOVE THE COMMENTS!
      # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
      # WEBDAV END
    </IfModule>


</VirtualHost>
Now, when i tri a .html page, i got response whitout problem.

But php dont work in vhost !!
But i have and alias whit phpmyadmin, and this WORKS FINE !!!. The server can execute php pages, but any that i dont see any in the configuration file.

Pls HELP !!!!

Last edited by gbr; 18th October 2012 at 15:12.
Reply With Quote
Sponsored Links
  #2  
Old 18th October 2012, 18:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,501 Times in 4,330 Posts
Default

1) Set php mode to php-fcgi in website settings
2) Enable suecec in website settings.
3) ensure that all files in the web folder belong to the correct user:

chown -R web1:client0 /var/www/servidorweb.gonetaplicaciones.es/web/*
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 18th October 2012, 18:35
gbr gbr is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
-rwxrwxrwx  1 web1 client0      24 oct 16 10:45 gon.php
the file that i got error look fine.

I dont kwon the reason ....
Reply With Quote
  #4  
Old 21st October 2012, 12:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Can you post the output of
Code:
ls -ls /var/www/***.es/
?
__________________
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
  #5  
Old 21st October 2012, 17:05
gbr gbr is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
/var/www/gonetaplicaciones.es/:
total 16
4 drwxr-x--x 2 web4 client0 4096 ago  3 11:58 cgi-bin
0 lrwxrwxrwx 1 root root      45 ago  3 11:58 log -> /var/log/ispconfig/httpd/gonetaplicaciones.es
4 drwxr-x--x 2 web4 client0 4096 ago  4 01:46 ssl
4 drwxrwxrwx 2 web4 client0 4096 oct 20 00:30 tmp
4 drwx--x--- 6 web4 client0 4096 oct  8 19:40 web

/var/www/mail.gonetaplicaciones.es/:
total 16
4 drwxr-x--x 2 web5 client0 4096 ago  3 19:38 cgi-bin
0 lrwxrwxrwx 1 root root      50 ago  3 19:38 log -> /var/log/ispconfig/httpd/mail.gonetaplicaciones.es
4 drwxr-x--x 2 web5 client0 4096 ago  5 22:27 ssl
4 drwxrwxrwx 2 web5 client0 4096 ago  3 19:38 tmp
4 drwx--x--- 5 web5 client0 4096 ago  4 03:13 web

/var/www/servidorweb.gonetaplicaciones.es/:
total 20
4 drwxr-x--x 2 web1 client0 4096 jul 31 10:45 cgi-bin
4 drwxr-x--x 4 web1 client0 4096 oct  6 14:28 leo
0 lrwxrwxrwx 1 root root      57 jul 31 10:45 log -> /var/log/ispconfig/httpd/servidorweb.gonetaplicaciones.es
4 drwxr-x--x 2 web1 client0 4096 jul 31 10:45 ssl
4 drwxrwxrwx 2 web1 client0 4096 oct 14 00:30 tmp
4 drwx--x--- 6 web1 client0 4096 oct 18 12:04 web
Reply With Quote
  #6  
Old 22nd October 2012, 18:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

I'm sorry, I meant
Code:
ls -la /var/www/***.es/
__________________
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
  #7  
Old 22nd October 2012, 18:43
gbr gbr is offline
Junior Member
 
Join Date: Oct 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
/var/www/gonetaplicaciones.es/:
total 28
drwxr-x--x 6 web4 client0 4096 oct  8 19:40 .
drwxr-xr-x 5 root root    4096 ago  4 14:43 ..
drwxr-x--x 2 web4 client0 4096 ago  3 11:58 cgi-bin
-rwxr-xr-x 1 root root      40 ago  3 11:59 .htpasswd_stats
lrwxrwxrwx 1 root root      45 ago  3 11:58 log -> /var/log/ispconfig/httpd/gonetaplicaciones.es
drwxr-x--x 2 web4 client0 4096 ago  4 01:46 ssl
drwxrwxrwx 2 web4 client0 4096 oct 20 00:30 tmp
drwx--x--- 6 web4 client0 4096 oct  8 19:40 web

/var/www/mail.gonetaplicaciones.es/:
total 24
drwxr-x--x 6 web5 client0 4096 ago  3 19:38 .
drwxr-xr-x 5 root root    4096 ago  4 14:43 ..
drwxr-x--x 2 web5 client0 4096 ago  3 19:38 cgi-bin
lrwxrwxrwx 1 root root      50 ago  3 19:38 log -> /var/log/ispconfig/httpd/mail.gonetaplicaciones.es
drwxr-x--x 2 web5 client0 4096 ago  5 22:27 ssl
drwxrwxrwx 2 web5 client0 4096 ago  3 19:38 tmp
drwx--x--- 5 web5 client0 4096 ago  4 03:13 web

/var/www/servidorweb.gonetaplicaciones.es/:
total 32
drwxr-x--x 7 web1 client0 4096 oct  3 14:47 .
drwxr-xr-x 5 root root    4096 ago  4 14:43 ..
drwxr-x--x 2 web1 client0 4096 jul 31 10:45 cgi-bin
-rwxr-xr-x 1 root root      40 sep 22 22:54 .htpasswd_stats
drwxr-x--x 4 web1 client0 4096 oct  6 14:28 leo
lrwxrwxrwx 1 root root      57 jul 31 10:45 log -> /var/log/ispconfig/httpd/servidorweb.gonetaplicaciones.es
drwxr-x--x 2 web1 client0 4096 jul 31 10:45 ssl
drwxrwxrwx 2 web1 client0 4096 oct 14 00:30 tmp
drwx--x--- 6 web1 client0 4096 oct 18 12:04 web
Reply With Quote
  #8  
Old 23rd October 2012, 17:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

Looks ok. Are there a .htaccess file in /var/www/servidorweb.gonetaplicaciones.es/web/? If so, what's in it?
__________________
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
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
Only Problems since Updating from 3.0.3.3 to 3.0.4.1 mbay General 4 17th May 2012 13:56
ubuntu and nginx delgado2061 Installation/Configuration 0 28th November 2011 00:36
Problem with services!! banzaiwebstudio.com Installation/Configuration 7 19th May 2010 22:13
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 08:29.


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