• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

adding a new domain causes syntax error in httpd.conf

  • Thread starter impressed webdesign
  • Start date
I

impressed webdesign

Guest
i have migrated allot of domains from a server with exactly the same software 500 domains where transfered without a problem.

now i cant add any domain`s anymore

if i add an domain everything in plesk is ok and the domain gets added.
if i then try to restart httpd from command i get the following error

[root@srv1 conf]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sat Sep 04 12:20:55 2010] [warn] module ssl_module is already loaded, skipping
httpd: Syntax error on line 211 of /etc/httpd/conf/httpd.conf: Syntax error on line 586 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /home/httpd/vhosts/domain.com/conf/httpd.include: Permission denied
[FAILED]

but the everything should be ok

the file is there on that location the rights and owner are the same as any other domain but it won`t load in httpd

what could this be if you need any logs or something just ask il post them asap!
 
yes thats the weird part plesk makes the files itself with that command and then when you try :

/etc/init.d/httpd configtest =
[Mon Sep 06 07:54:46 2010] [warn] module ssl_module is already loaded, skipping
Syntax OK
/etc/init.d/httpd reload =
Reloading httpd: not reloading due to configuration syntax error
[FAILED]

and if you force it to condrestart or stop or restart then it won`t load because of :
[root@srv1 conf]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Sat Sep 04 12:20:55 2010] [warn] module ssl_module is already loaded, skipping
httpd: Syntax error on line 211 of /etc/httpd/conf/httpd.conf: Syntax error on line 586 of /etc/httpd/conf.d/zz010_psa_httpd.conf: Could not open configuration file /home/httpd/vhosts/domain.com/conf/httpd.include: Permission denied
[FAILED]

i tried to check the rights of the folders "ls -al" and of the files of the parent folder the user that runs apache ( "apache" ) the owner and group of the files and folders there all so it seems exactly right ( the same as all the other vhost domains.
 
Probably, the domain ' domain.com ' has incorrect permissions itself. Could you please run the same command for this specific domain domain.com :
/usr/local/psa/admin/sbin/vhostmng --install-vhost --vhost-name=<domains> --user-name=<ftpuser> --set-content-permissions

Also it can be related to incorrect SELinux settings. Did you changed it recently?
 
i cant execute the command atm because the other domains are live.
il try that tonight

is there a way to see what the error is when i use :
[root@srv1 init.d]# /etc/init.d/httpd reload
Reloading httpd: not reloading due to configuration syntax error
[FAILED]

because i don`t know wich domain is causing the trouble a this moment.

the problem started after i did one of the following.

* changed the vhost dir ( /var/www/vhosts to /home/httpd/vhosts with a parallels tutorial "http://kb.odin.com/1165")
* rsync the /home/httpd/vhosts folder with the old server ( same plesk version , same mysql version, same apache version, same users and domains )
 
rsync the /home/httpd/vhosts folder with the old server

Are you sure that it is not a reason of wrong permissions problem?
 
al the main folders are "drwxr-xr-x 14 root root" is this correct ?

the folders in the /home/httpd/vhosts/domain.com/ are

drwxr-xr-x 14 root root 4096 Sep 2 11:02 .
drwxr-xr-x 214 root root 12288 Sep 5 08:33 ..
drwxr-x--- 5 client_username psaserv 4096 Sep 2 11:02 anon_ftp
drwxr-xr-x 2 root psaserv 4096 Sep 2 11:02 bin
drwxr-x--- 3 client_username psaserv 4096 May 31 2007 cgi-bin
drwxr-x--- 2 client_username psaserv 4096 Sep 4 12:12 conf
drwxr-xr-x 2 client_username psaserv 4096 May 31 2007 error_docs
drwxrwxrwx 38 client_username psaserv 4096 Sep 4 11:46 httpdocs
drwxr-x--- 7 client_username psaserv 4096 May 31 2007 httpsdocs
drwxr-x--- 2 root psaserv 4096 Sep 2 11:03 pd
drwx------ 2 client_username psacln 4096 May 31 2007 private
dr-xr-x--- 7 root psaserv 4096 Sep 2 11:02 statistics
drwxr-xr-x 2 root psaserv 4096 Sep 2 11:02 subdomains
drwxr-xr-x 2 root psaserv 4096 Sep 2 11:02 web_users

the httpd.include file has :

-rw-r--r-- 1 root root 2948 Sep 4 12:12 httpd.include
 
o and i changed the root password after installation from the shell with : passwd
 
# stat /var/www/vhosts/imabee.com/
File: `/var/www/vhosts/imabee.com/'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: c5h/197d Inode: 21925139 Links: 14
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

# stat /var/www/vhosts/imabee.com/conf/httpd.include
File: `/var/www/vhosts/imabee.com/conf/httpd.include'
Size: 1240 Blocks: 8 IO Block: 4096 regular file
Device: c5h/197d Inode: 21802376 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)

What about output of 'getenforce'? It should be something like:

# getenforce
Disabled
 
[root@srv1 vhosts]# stat d33f.nl
File: `d33f.nl'
Size: 4096 Blocks: 16 IO Block: 4096 directory
Device: 901h/2305d Inode: 234587665 Links: 14
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2010-09-06 09:36:34.000000000 +0200
Modify: 2010-09-02 11:02:30.000000000 +0200
Change: 2010-09-02 11:02:47.000000000 +0200

[root@srv1 d33f.nl]# getenforce
Enforcing
 
[root@srv1 vhosts]# /etc/init.d/httpd reload
Reloading httpd: [ OK ]

so it has to do with that :D

how to fix it ?
is it the rights of the folders or maybe something else ?
 
Back
Top