recreating httpd.conf file (Noob question of the day)

2 posts / 0 new
Last post
#1 Wed, 11/15/2017 - 12:06
jtipton

recreating httpd.conf file (Noob question of the day)

OK I have not rebooted this server in over 6 months, backups go back 3 months, and this corruption has been there for a while with no issues. Until the dreaded reboot. I have multiple issues with duplication of some lines and other lines not even in the config anymore.

I have these missing for site: SuexecUserGroup "#505" "#504" ServerName livezilla.tspec.net ServerAlias www.livezilla.tspec.net ServerAlias webmail.livezilla.tspec.net ServerAlias admin.livezilla.tspec.net

I have these lines multiple times in the same virtualhost

AddType application/x-httpd-php .php AddHandler fcgid-script .php AddHandler fcgid-script .php5 AddHandler fcgid-script .php5.5 FCGIWrapper /home/livezilla/fcgi-bin/php5.fcgi .php FCGIWrapper /home/livezilla/fcgi-bin/php5.fcgi .php5 FCGIWrapper /home/livezilla/fcgi-bin/php5.5.fcgi .php5.5

The error that started this was an error saying it was expecting /file but instead found /virtualhosts

So is there a way to have the system recreate this file? Or (something I have not found yet) a sample of how the httpd.conf file should look?

Sat, 11/18/2017 - 12:08
tpnsolutions
tpnsolutions's picture

Hi,

Technically, if the broken VirtualHost was originally created by Virtualmin it may be possible to re-create. Assuming the former, you could go into Virtualmin and click "Edit Virtual Server", uncheck "Apache website enabled?" and "Apache SSL website enabled?" (if you enabled SSL before), click "Save Virtual Server", confirm the change, then click "Edit Virtual Server" and recheck "Apache website enabled?" and "Apache SSL website enabled?".

This would first delete the configuration files in Apache, then attempt to re-create them. However, the issue is too great, then you'd have to take alternate steps.

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked