My httpd.conf got trashed on FreeBSD
uname -a
FreeBSD ares 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 [email protected]:/usr/obj/usr/src/sys/GENERIC i386
I am running apache-2.0.63_2. What I did was to modify /home/user/public_html/.htaccess and add a Deny from rule and then restart apache with.
Any ideas? Any known bug for this? Did I do something wrong?
Apache reads its configuration file only once on startup. Whenever you make a change to
httpd.conf
, you need to tell Apache that you have changed its configuration file, and that it should reload the file. One way to do this is by restarting Apache.A consequence of the above is that Apache does not react to any changes in its configuration file until you tell it to (such as by restarting). It's more likely that your
httpd.conf
was changed ("trashed" as you put it) by something else some time in the past after the last time you restarted Apache. In this situation, you would not have seen the effect of a changedhttpd.conf
until the next time Apache was restarted.If by httpd.conf got trashed you mean site not opening and giving 500 error then it could be problem with .htaccess syntax. If you make mistakes in .htaccess file then for all pages within that directory or its subdirectories you will 500 Internal Server Error.
But by httpd.conf got trashed you mean apache not starting at all then it is something else. You can try to copy a fresh httpd.conf from other similar installation and try starting apache. If this works add few lines at a time from old file to new file to find exactly which line is causing problem.