HOWTO: PHP 5 CLI to PHP 5 CGI + suPHP

Dennis

Verified User
Joined
Nov 13, 2004
Messages
123
Location
The Netherlands
Tnx for the reaction Circlesquare,

Still I am not happy with the custom tmp dir for each user. Because this script:

Code:
echo "open_basedir = /home/$username/:/tmp/" >> /usr/local/directadmin/data/users/$username/php/php.ini
echo "upload_tmp_dir = /home/$username/tmp/" >> /usr/local/directadmin/data/users/$username/php/php.ini
echo "session.save_path = /home/$username/tmp/" >> /usr/local/directadmin/data/users/$username/php/php.ini
The script is overriding two settings of the normal php.ini. The upload and session save paths are now on the normal partition. I secured the /tmp against, for example execution scripts. If the customer has an old version of some program with a leak/gap/bug, the hacker uploads files with these settings and I think they can execute files from the custom users tmp dir.

I also do not like those session files there :) the /tmp partiontion is too big to leave it this empty.

I checked the /usr/local/etc/php5/cgi/php.ini and found that "upload_tmp_dir" and "session.save_path" both are comment out. They are also comment out in the old php.ini of mod_php. The script also adds the /tmp/ in the "open_base_dir" command so I am first just removing the custom user /tmp dirs.

I will let you know how this works out.

Regards,

Dennis
 

circlesquare

Verified User
Joined
May 24, 2007
Messages
24
Hi Dennis,

I have also got cold feet about the per user tmp directory as I have been able to find more information about the security implications, so have taken it out of the how to.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
I have also got cold feet about the per user tmp directory as I have been able to find more information about the security implications, so have taken it out of the how to.
But have you forgotten to add /tmp back into the php.ini file? It wasn't in an install i did following your instructions; I had to add it.

Also check your HowTo; look for the line:
perl and cgi scripts need execute permissions though
and see the code block under that.

Where you've got
Code:
/domain/
I believe you should have
Code:
/domains/
Jeff
 

scooby2

Verified User
Joined
May 18, 2008
Messages
15
Location
Chicago, IL
Excellent howto. I would have had no clue how to do this otherwise. Its good to lock down php in case a security hole is found or a customer does something stupid.

Jlasman is correct about the domain typo. change domain to domains. The other problem I had was that I had to add /usr/local/php5/lib/php to user php.ini files so that they could access the pear modules.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
The other problem I had was that I had to add /usr/local/php5/lib/php to user php.ini files so that they could access the pear modules.
More detail please :)...

Exactly what and where?

Thanks!

Jeff
 

massive

Verified User
Joined
Feb 16, 2006
Messages
307
The only problem that i mentioned with this guide was that it conflicts with this :

http://help.directadmin.com/item.php?id=176

When i am trying to see a link like this : http://12.34.56.78/~user/info.php

I am getting this error : No input file specified.

Apache Version : 2.2.13
PHP = 5.2.10

and solved wih just comment out the open_basedir = /var/www/html/:/tmp/
from php.ini and it's working properly (which is very strange though)
 

Mannekino

Verified User
Joined
Sep 1, 2009
Messages
9
Instead of using:

Code:
./build secure_php
I think you can also use:

Code:
php_ini_type=recommended
In your options.conf file.

I am right?

So it will look like this:

Code:
#PHP settings. default_php possible values - 4 or 5
default_php=5
php5_cli=no
php5_cgi=yes
php4_cli=no
php4_cgi=no
php_ini=yes
#Possible values - recommended or dist
php_ini_type=recommended
zend=yes
 

tsiou

Verified User
Joined
Sep 15, 2006
Messages
236
Location
Larisa, Greece
Can someone who followed this how to, to send me a copy of the default httpd.conf and php.ini that created for apache 2.x and php5?
I dont mind the os, i'm ok with any linux/bsd dist...

attach it to a reply or send it with a pm...

you can delete all references to your server or virtual host and usernames...

Thanks in advance....
 

yatoula

New member
Joined
Sep 7, 2009
Messages
138
Location
France (Metz)
when i want install suphp i have this error
# ls -l /home | grep '^d' | awk '{system("chown -R " $3 ":" $4 " /home/" $9 "/domains")}'
chown: cannot access `/home/ftp/domains': No such file or directory
chown: cannot access `/home/lost+found/domains': No such file or directory
chown: cannot access `/home/tmp/domains': No such file or directory
Why , thanks..
 

Dennis

Verified User
Joined
Nov 13, 2004
Messages
123
Location
The Netherlands
@yatoula

chown: cannot access `/home/ftp/domains': No such file or directory
This means you have a directory '/home/ftp' but in that directory there is no directory named "domains". So the chown cannot be excecuted.....

@All
If a customer wants to use cronjobs they need to add the php.ini in the cron command:

Code:
/usr/local/bin/php -c /usr/local/directadmin/data/users/accountname/php/php.ini /home/accountname/domains/domainname/public_html/filetocron.php
 
Last edited:

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
After following the instructions in this thread some Joomla sites still failed to work for a client. We eventually discovered that only new users on his server were getting custom php.ini files; the converted users were still pointing to the serverwide php.ini file.

Problems referenced in this thread.

Did I miss something in this How-To?

Thanks.

Jeff
 

circlesquare

Verified User
Joined
May 24, 2007
Messages
24
After following the instructions in this thread some Joomla sites still failed to work for a client. We eventually discovered that only new users on his server were getting custom php.ini files; the converted users were still pointing to the serverwide php.ini file.

Problems referenced in this thread.

Did I miss something in this How-To?
Possibly missed this part:

rewrite httpd configs for current users
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
 

circlesquare

Verified User
Joined
May 24, 2007
Messages
24
The only problem that i mentioned with this guide was that it conflicts with this :

http://help.directadmin.com/item.php?id=176

When i am trying to see a link like this : http://12.34.56.78/~user/info.php

I am getting this error : No input file specified.

Apache Version : 2.2.13
PHP = 5.2.10

and solved wih just comment out the open_basedir = /var/www/html/:/tmp/
from php.ini and it's working properly (which is very strange though)
Instead of commenting out the open_basedir = /var/www/html/:/tmp/ (it is there for security) just add the user home directories to it:
Code:
open_basedir = /var/www/html/:/tmp/:/home/
This is still not very secure though as users can gain access to other home directories if the script is executed in ~username mode.

I would recommend not using the ~username feature because of the security risks here
 

xter

Verified User
Joined
Oct 14, 2009
Messages
5
could someone help me install this?,
im not sure im getting this tutorial :(
 

massive

Verified User
Joined
Feb 16, 2006
Messages
307
Instead of commenting out the open_basedir = /var/www/html/:/tmp/ (it is there for security) just add the user home directories to it:
Code:
open_basedir = /var/www/html/:/tmp/:/home/
This is still not very secure though as users can gain access to other home directories if the script is executed in ~username mode.

I would recommend not using the ~username feature because of the security risks here

Thanks for your reply circlesquare
I think that this security issue can bypassed with this :
http://www.directadmin.com/features.php?id=961
 

iellison

New member
Joined
Nov 13, 2009
Messages
1
Hello,

Thank you for the information. I followed your instructions, and only ran into a couple of issues. I am currently running Apache 1.3.41, thus needed to make the necessary mods to the right template files (your instructions cover apache2 only it seems and in my cut and paste frenzy I overlooked the 2* for the config templates :) ). This led to the classic "no input file specified problem".

After getting that fixed, the open_basedir setting in the main php5 ini file led to the directadmin control panel on port 2222 complaining that it couldn't access the skins folder (I am currently using the Capri skin, but figure this is probably irrelevant). This seemed a bit odd to me. To get that working, I added /usr/local/directadmin/data/skins:/usr/local/directadmin/data/skin_data to the open_basedir directive. My question is, is this normal? Is this because I'm running 1.3.41 version of apache? Is this going to cripple the functionality of directadmin in any way?

Thanks for any help.
 

jpb77

New member
Joined
Dec 21, 2009
Messages
5
Hi guys, we are using Joomla on our VPS and was advised to switch to suPHP etc etc. We followed the instructions etc etc and when wanted to restart the apache server, we got the following

Stopping httpd: [FAILED]
Starting httpd: Syntax error on line 36 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'suPHP_UserGroup', perhaps misspelled or defined by a module not included in the server configuration


All we did is follow the instructions and we got the error message above, now the websites are down, we can still access Directadmin though BUT also webmail has now gone down....

We have PHP 5, Apache 2, Centos 5.

This is the HTTP.CONF file from the directory listed above;

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.

ServerRoot "/etc/httpd"
Listen 80

#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
#LoadModule php5_module /usr/lib/apache/libphp5.so
Include /etc/httpd/conf/extra/httpd-phpmodules.conf

User apache
Group apache

ServerAdmin admin@localhost
DocumentRoot "/var/www/html"

<Directory /home/*>
AllowOverride All
Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

<Directory />
Options All
AllowOverride All
</Directory>

<Directory "/var/www/html">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_suphp.c>
suPHP_Engine On
#suPHP_UserGroup admin admin
SetEnv PHP_INI_SCAN_DIR
</IfModule>
</Directory>

<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog /var/log/httpd/error_log
LogLevel warn

<IfModule log_config_module>
#replace %b with %O for more accurate logging
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%O" bytes

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog /var/log/httpd/access_log common
</IfModule>

<IfModule alias_module>
# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf
</IfModule>

<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-gzip .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType video/x-ms-asf .avi
AddType video/mpeg .mpg
AddType video/mpeg .mpeg
AddType video/quicktime .mov
AddType video/x-ms-wmv .wmv
</IfModule>

#EnableMMAP off
#EnableSendfile off

#######################################################################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
#######################################################################################

# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

# Deflate module settings
Include conf/extra/httpd-deflate.conf

# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

# All suPHP directives
Include conf/extra/httpd-suphp.conf

# For user configurations not maintained by DirectAdmin. Empty by default.
Include conf/extra/httpd-includes.conf

#######################################################################################
# End of included files that are rewritten by DirectAdmin #
#######################################################################################

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>


Please help!!!
 
Last edited:

jpb77

New member
Joined
Dec 21, 2009
Messages
5
We have completed following the instructions however when we go to restart the server we get the following errors in SSH

[root@server ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
[Tue Dec 22 02:27:08 2009] [warn] module suphp_module is already loaded, skipping
httpd: Syntax error on line 161 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Synt ax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhos ts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/dir ectadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/c onf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admi n/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/da ta/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/d irectadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error o n line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: S yntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-v hosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/ directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/http d/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax er ror on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.co nf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/a dmin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin /data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/loca l/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax erro r on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf : Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmi n-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/ext ra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/h ttpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on lin e 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd .conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/user s/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directad min/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/l ocal/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax e rror on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.c onf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directa dmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/ extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /et c/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syn tax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/ht tpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/u sers/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/direc tadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /us r/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on li ne 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Synta x error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhost s.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/dire ctadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/co nf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin /httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/dat a/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/di rectadmin/data/users/admin/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/extra/directadmin-vhosts.conf: Syntax error on line 161 of /usr/local/directadmin/data/users/admin/httpd.conf: Syntax error on li


Here is the http.conf file;

#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.

ServerRoot "/etc/httpd"
Listen 80

#LoadModule dummy_module /usr/lib/apache/mod_dummy.so
#LoadModule php5_module /usr/lib/apache/libphp5.so
Include /etc/httpd/conf/extra/httpd-phpmodules.conf

User apache
Group apache

ServerAdmin admin@localhost
DocumentRoot "/var/www/html"

<Directory /home/*>
AllowOverride All
Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

<Directory />
Options All
AllowOverride All
</Directory>

<Directory "/var/www/html">
Options -Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_suphp.c>
suPHP_Engine On
suPHP_UserGroup admin admin
SetEnv PHP_INI_SCAN_DIR
</IfModule>
</Directory>

<IfModule dir_module>
DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

ErrorLog /var/log/httpd/error_log
LogLevel warn

<IfModule log_config_module>
#replace %b with %O for more accurate logging
<IfModule mod_logio.c>
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%O" bytes

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>

CustomLog /var/log/httpd/access_log common
</IfModule>

<IfModule alias_module>
# Include some DirectAdmin alias
Include conf/extra/httpd-alias.conf
</IfModule>

<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-gzip .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType video/x-ms-asf .avi
AddType video/mpeg .mpg
AddType video/mpeg .mpeg
AddType video/quicktime .mov
AddType video/x-ms-wmv .wmv
</IfModule>

#EnableMMAP off
#EnableSendfile off

#######################################################################################
# Do not change anything in included files, because they are rewritten by DirectAdmin #
#######################################################################################

# This is needed for PHP
Include conf/extra/httpd-php-handlers.conf

# Server-pool management (MPM specific)
Include conf/extra/httpd-mpm.conf

# Multi-language error messages
Include conf/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
Include conf/extra/httpd-autoindex.conf

# Language settings
Include conf/extra/httpd-languages.conf

# User home directories
#Include conf/extra/httpd-userdir.conf

# Real-time info on requests and configuration
Include conf/extra/httpd-info.conf

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
Include conf/extra/httpd-dav.conf

# Various default settings
Include conf/extra/httpd-default.conf

# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

# Deflate module settings
Include conf/extra/httpd-deflate.conf

# All the DirectAdmin vhosts
Include conf/extra/directadmin-vhosts.conf

# All suPHP directives
Include conf/extra/httpd-suphp.conf

# For user configurations not maintained by DirectAdmin. Empty by default.
Include conf/extra/httpd-includes.conf

#######################################################################################
# End of included files that are rewritten by DirectAdmin #
#######################################################################################


And here is the directadmin-vhosts.conf file;

Include /usr/local/directadmin/data/users/admin/httpd.conf
Include /usr/local/directadmin/data/users/squirtfm/httpd.conf
Include /usr/local/directadmin/data/users/vpa/httpd.conf

What is going on??
 
Top