View Single Post
  #1  
Old 13th May 2012, 05:57
vestport4 vestport4 is offline
Junior Member
 
Join Date: Jun 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Listing Directories and CGI

Hello, Running ISPCONFIG3 on 64 bit centos 5.8 Final

Having problems configuring my system to list directories in

Code:
"/var/www/mydomain.com/web/files/"
and running cgi in
Code:
/var/www/mydomain.com/web/files/cgi/
I check /etc/httpd/conf/sites-enabled/mysite.com.vhost and noticed several of similar listings for the directory like:

Code:
     <Directory /var/www/mydomain.com/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/client1/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>



<Directory /var/www/mydomain.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
 </Directory>
 <Directory /var/www/clients/client1/web1/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all

        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
 </Directory>


 <Directory /var/www/mydomain.com/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

A few questions:

First: Does one entry with the same path just keep over writing the other?

Second: Can I back this file up and regenerate a default file without blowing away the domain & web files etc.

Third: Is it safe to edit directly (with a backup of course)?

Fourth: Will anything overwrite this file automatically in the future (updates)?


Tried apache directives from the ISPCONFIG console and no luck. Also, tried apache directives for a different domain to try to +Indexes etc. and no luck. In fact on the other domain after /etc/init.d/httpd restart I don't even see the updates in the .vhost file.

Also, just wanted to mention that NO I don't have any .htaccess file in these directories.

I do however have Joomla installed. Not sure if that is a deal breaker or need to chmod special permissions.




Here is the entire .vhost file for the domain in question below:

<Directory /var/www/myhost.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost *:80>
DocumentRoot /var/www/myhost.com/web

ServerName myhost.com
ServerAlias www.myhost.com
ServerAlias renrealtors.myhost.com
ServerAlias mail.myhost.com
ServerAlias mls.myhost.com
ServerAlias admin.myhost.com
ServerAlias office.myhost.com
ServerAlias preforeclosures.myhost.com
ServerAlias joomla.myhost.com
ServerAlias shortsales.myhost.com
ServerAdmin webmaster@myhost.com

ErrorLog /var/log/ispconfig/httpd/myhost.com/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 /var/www/myhost.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client1/web1/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

<IfModule mod_ruby.c>
<Directory /var/www/clients/client1/web1/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

# cgi enabled
<Directory /var/www/clients/client1/web1/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# suexec enabled
SuexecUserGroup web1 client1
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# php as fast-cgi enabled
<IfModule mod_fcgid.c>

# SocketPath /tmp/fcgid_sock/

# IdleTimeout n (3600 seconds)
# An idle fastcgi application will be terminated after IdleTimeout sec
onds.
IdleTimeout 3600

# ProcessLifeTime n (7200 seconds)
# A fastcgi application will be terminated if lifetime expired, even no error is detected.
ProcessLifeTime 7200

# MaxProcessCount n (1000)
# The max count of total fastcgi process count.
# MaxProcessCount 1000

# DefaultMinClassProcessCount n (3)
# The minimum number of fastcgi application instances for any one fastcgi application.
# Idle fastcgi will not be killed if their count is less than n
# Set this to 0, and tweak IdleTimeout
DefaultMinClassProcessCount 0

# DefaultMaxClassProcessCount n (100)
# The maximum number of fastcgi application instances allowed to run for
# particular one fastcgi application.
DefaultMaxClassProcessCount 100
# IPCConnectTimeout n (3 seconds)
# The connect timeout to a fastcgi application.
IPCConnectTimeout 8

# IPCCommTimeout n (20 seconds)
# The communication timeout to a fastcgi application. Please increase this
# value if your CGI have a slow initialization or slow respond.
IPCCommTimeout 360

# BusyTimeout n (300 seconds)
# A fastcgi application will be terminated if handing a single request
# longer than busy timeout.
BusyTimeout 300

</IfModule>
<Directory /var/www/myhost.com/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/client1/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>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^renrealtors.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/renrealtors/$1 [L]
RewriteCond %{HTTP_HOST} ^mail.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com:8080/webmail/$1 [R,L]
RewriteCond %{HTTP_HOST} ^mls.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/mls/$1 [L]
RewriteCond %{HTTP_HOST} ^admin.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com:8080/$1 [L]
RewriteCond %{HTTP_HOST} ^office.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/office/$1 [L]
RewriteCond %{HTTP_HOST} ^preforeclosures.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/preforeclosures/$1 [L]
RewriteCond %{HTTP_HOST} ^joomla.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/administrator/$1 [L]
RewriteCond %{HTTP_HOST} ^shortsales.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.vesport.com/files/preforeclosures/$1 [L]

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

<IfModule mod_dav_fs.c>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>


</VirtualHost>



<IfModule mod_ssl.c>
################################################## #########
# SSL Vhost
################################################## #########

<VirtualHost *:443>
DocumentRoot /var/www/myhost.com/web

ServerName myhost.com
ServerAlias www.myhost.com
ServerAlias renrealtors.myhost.com
ServerAlias mail.myhost.com
ServerAlias mls.myhost.com
ServerAlias admin.myhost.com
ServerAlias office.myhost.com
ServerAlias preforeclosures.myhost.com
ServerAlias joomla.myhost.com
ServerAlias shortsales.myhost.com
ServerAdmin webmaster@myhost.com

ErrorLog /var/log/ispconfig/httpd/myhost.com/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

SSLEngine on
SSLCertificateFile /var/www/clients/client1/web1/ssl/myhost.com.crt
SSLCertificateKeyFile /var/www/clients/client1/web1/ssl/myhost.com.key

<Directory /var/www/myhost.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client1/web1/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

# cgi enabled
<Directory /var/www/clients/client1/web1/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client1/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
# suexec enabled
SuexecUserGroup web1 client1
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# php as fast-cgi enabled
<IfModule mod_fcgid.c>
# SocketPath /tmp/fcgid_sock/
# IdleTimeout n (3600 seconds)
# An idle fastcgi application will be terminated after IdleTimeout seconds.
IdleTimeout 3600

# ProcessLifeTime n (7200 seconds)
# A fastcgi application will be terminated if lifetime expired, even no error is detected.
ProcessLifeTime 7200

# MaxProcessCount n (1000)
# The max count of total fastcgi process count.
# MaxProcessCount 1000

# DefaultMinClassProcessCount n (3)
# The minimum number of fastcgi application instances for any one fastcgi
application.
# Idle fastcgi will not be killed if their count is less than n
# Set this to 0, and tweak IdleTimeout
DefaultMinClassProcessCount 0

# DefaultMaxClassProcessCount n (100)
# The maximum number of fastcgi application instances allowed to run for
# particular one fastcgi application.
DefaultMaxClassProcessCount 100

# IPCConnectTimeout n (3 seconds)
# The connect timeout to a fastcgi application.
IPCConnectTimeout 8

# IPCCommTimeout n (20 seconds)
# The communication timeout to a fastcgi application. Please increase this
# value if your CGI have a slow initialization or slow respond.
IPCCommTimeout 360

# BusyTimeout n (300 seconds)
# A fastcgi application will be terminated if handing a single request
# longer than busy timeout.
BusyTimeout 300
</IfModule>
<Directory /var/www/myhost.com/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/client1/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>

RewriteEngine on
RewriteCond %{HTTP_HOST} ^renrealtors.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/renrealtors/$1 [L]
RewriteCond %{HTTP_HOST} ^mail.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com:8080/webmail/$1 [R,L]
RewriteCond %{HTTP_HOST} ^mls.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/mls/$1 [L]
RewriteCond %{HTTP_HOST} ^admin.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com:8080/$1 [L]
RewriteCond %{HTTP_HOST} ^office.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/office/$1 [L]
RewriteCond %{HTTP_HOST} ^preforeclosures.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/preforeclosures/$1 [L]
RewriteCond %{HTTP_HOST} ^joomla.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/administrator/$1 [L]
RewriteCond %{HTTP_HOST} ^shortsales.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.vesport.com/files/preforeclosures/$1 [L]

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

<IfModule mod_dav_fs.c>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
RewriteCond %{HTTP_HOST} ^preforeclosures.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/files/preforeclosures/$1 [L]
RewriteCond %{HTTP_HOST} ^joomla.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.myhost.com/administrator/$1 [L]
RewriteCond %{HTTP_HOST} ^shortsales.myhost.com [NC]
RewriteRule ^/(.*)$ https://www.vesport.com/files/preforeclosures/$1 [L]

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

<IfModule mod_dav_fs.c>
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>


</VirtualHost>
</IfModule>






Thanks in advance for any replies.


Art

Last edited by vestport4; 13th May 2012 at 06:08. Reason: Additional Information
Reply With Quote
Sponsored Links