0

Apache on a server i'm helping manage has stopped reading virtual host configuration files. It's OpenVZ with a Plesk control panel. The client used Plesk to create the virtual hosts, and the config files are located in...

/var/www/vhosts/example.com/conf

This is the contents of that folder

-rw-r-----  1 root apache  6198 Jan 17  2011 12952768310.70665900_httpd.include
-rw-r-----  1 root apache  6198 Jul 25  2011 13115853090.03526500_httpd.include
-rw-r-----  1 root apache   291 Jan 18  2012 13268503300.41421300_httpd.include
-rw-r-----  1 root apache  6198 Apr  4  2012 13335434130.50578900_httpd.include
-rw-r-----  1 root apache  6198 Apr 10  2012 13340548100.11025400_httpd.include

Yesterday I updated packages with yum update in a terminal, could apache's main configuration file been overwritten? If so is there any steps I can take in Plesk to reconfigure it?

Running apachectl -t -D DUMP_VHOSTS shows the two name based virtual hosts and shows the config files for them in /var/www/vhosts.example.com/conf, and says the Syntax is ok

When I run yum provides */mod_access.so I see openvz-utils which is a package I updated yesterday. Would really appreciate any help thanks

This is the httpd.conf file http://pastebin.com/CHgX3RbT

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Anagio
  • 216
  • 2
  • 15
  • Are there any error messages logged to the console or the error log when you start the httpd service? – user9517 Mar 21 '13 at 08:44
  • @Iain no none, httpd starts with no errors. Syntax for my vhosts is correct. I think it has to do with updating rpm's / packages and maybe wiping out any changes to httpd.conf that plesk may have made when the vhosts were created in the control panel. – Anagio Mar 21 '13 at 08:46
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Feb 26 '15 at 09:09

1 Answers1

2

You could try adding a line

Include /var/www/vhosts/example.com/conf/*.conf

into your httpd.conf file after the default

Include conf.d/*.conf

at line 210. Which may get things up and running. If this works then you probably need to speak to plesk support to find out why the update overwrote the original so you can prevent it happening again in future.

Edit:

I found these commands which may be useful (the websrvmng may be in /usr/local/psa/admin/sbin or /usr/local/psa/admin/bin)

sudo websrvmng -v -a

which recreates the httpd config files.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • I hadn't looked at apache's error log. httpd.id wasn't being created. I made the directory and change it's group to apache and with your include line above it's working for that one virtual host, not for the others. I'm going to re-create a vhost from plesk to see what changes it makes to httpd.conf then re-create them for the others. I did read an article on how to exclude packages from yum updates httpd, php, mysql etc to avoid these problems. Thanks for the help – Anagio Mar 21 '13 at 09:07
  • @Anagio: try using the `websrvmng` command to recreate all the vhosts. – user9517 Mar 21 '13 at 09:08
  • Thanks but my client told me the other vhosts were for testing and not needed so i'm going to leave it for now. httpd didn't log errors to console about not being able to create the httpd.pid file which seems to have been one problem. Still not sure what plesk does to httpd.conf to load conf files but maybe just a line like yours is appended. – Anagio Mar 21 '13 at 09:13