Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 29th January 2011, 00:03
wildnux wildnux is offline
Junior Member
Join Date: Sep 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation FastCGI PHP and permissions issue on ISPConfig perfect server (opensuse 11.3)

I am having some permission issues with my site. I do not know a lot about vhosts (on the process of learning ) and apache directives. I am trying to run php as cgi and I have them with .cgi extension.

(I am trying to setup my personal server to do my school projects and the school project require .cgi extension for php - they work on school servers so i want to setup my server to do the same so that i can work on my own computer which is way faster than working on school servers)

My expectations:
* php run as cgi script, (php files with .cgi extensions)
* give 701 permissions for directories and .cgi files and 604 for others except for some php files which are accessed by the .cgi files themselves. I want 600 for these files
* site work with the above settings

What it currently does:

* php runs as cgi script with .cgi extensions, i added .cgi on AddHandler line, but it has to be 711 permission. if i give no permissions to group, it will not run.

I do not want to give any permission to group, and go with 701, 604 etc, how can i achieve that?

Another minor problem: the school servers check for the shebang line and if there is no shebang line, it gives error, mine just ignores shebang line and works without it, it is not that important for me, as i will be running it only web script, but will love to know how to do that.

here is my vhost file, please ask for more files if you need to see. (newbie, don't know much):

<Directory /srv/www/csce4420.dyndns.org>
    AllowOverride None
    Order Deny,Allow
    Deny from all

<VirtualHost *:80>
      DocumentRoot /srv/www/clients/client2/web4/web
    ServerName csce4420.dyndns.org
    ServerAlias www.csce4420.dyndns.org
    ServerAdmin webmaster@csce4420.dyndns.org

    ErrorLog /var/log/ispconfig/httpd/csce4420.dyndns.org/error.log

    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 503 /error/503.html
    <Directory /srv/www/csce4420.dyndns.org/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    <Directory /srv/www/clients/client2/web4/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

    # suexec enabled
    SuexecUserGroup web4 client2
    # Clear PHP settings of this website
    <FilesMatch "\.ph(p3?|tml)$">
        SetHandler None
    # php as cgi enabled
    ScriptAlias /php5-cgi /srv/www/php-cgi-scripts/web4/php-cgi-starter
    Action php5-cgi /php5-cgi
    AddHandler php5-cgi .cgi .php .php3 .php4 .php5
    <Directory /srv/www/php-cgi-scripts/web4/>
        Order allow,deny
        Allow from all

    # add support for apache mpm_itk
    <IfModule mpm_itk_module>
      AssignUserId web4 client2

    <IfModule mod_dav_fs.c>
      # WEBDAV END

Please give me some suggestions and show me some path. I have other two hosts on the same server, one has joomla cms and other drupal and are running fine with fastCGI, but this one I need it to be slightly different. I found out the school server uses cgi/fastCGI also using phpinfo.

they have the following for cgi/fastcgi which i also have:

cgi.check_shebang_line 1 1
cgi.fix_pathinfo 1 1
cgi.nph 0 0
cgi.rfc2616_headers 0 0
fastcgi.logging 1 1

BTW, I have ISPConfig

Thank you

Last edited by wildnux; 29th January 2011 at 00:07.
Reply With Quote
Sponsored Links


cgi, fastcgi, ispconfig 3, opensuse 11.3, php

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
suPHP and suEXEC broken by default in Ubuntu 10.04 Perfect Server jumba HOWTO-Related Questions 24 17th June 2010 17:51
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
fastcgi and php with ispconfig tosser Installation/Configuration 14 18th January 2009 14:41
Urgent! pop server down, website down, ispconfig working gwa7 Installation/Configuration 4 8th November 2008 19:56
fastcgi and php with ispconfig tosser Tips/Tricks/Mods 3 25th June 2006 22:01

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

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