Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I already setup a conf for a site in the /etc/httpd/sites-available. However, I am wondering how can I enable this, like a2ensite in Debian, wherein the conf file will appear in the sites-enabled?

share|improve this question
up vote 4 down vote accepted

Mimicking the Debian config system isn't difficult.

  1. In your Apache config, you have to include every *.conf file in /etc/httpd/sites-enabled with the directive Include sites-enabled/*.conf.
  2. Add the config to a *.conf file in /etc/httpd/sites-available.
  3. Activate the site in the config file by creating a link from the relevant file in /etc/httpd/sites-available into /etc/httpd/sites-enabled, which is basically the only thing that a2enable does on Debian.
share|improve this answer
I did ln -s but when I restart it failed to start the httpd. – fishcracker Jan 28 '13 at 9:51
Please add the failure messages (and your current config, if possible) to your question. – Sven Jan 28 '13 at 10:45
To clarify a bit, you need to edit your httpd.conf the directive to include the files in /etc/httpd/sites-enabled/. I have specified only the ones with a .conf extension using the following directive "Include sites-enabled/*.conf". You could also script a script to create and break the the link. – flickerfly Aug 6 '14 at 19:42


ln -s /etc/httpd/sites-available/ /etc/httpd/conf.d/


unlink /etc/httpd/conf.d/
share|improve this answer
I'm not sure why this was downvoted, perhaps because it doesn't include the step to actually bring those files into the config? What is here is accurate though. Also, unlink and rm are fundamentally the same. I avoid unlink as I've not come up with a scenario where it is better aside from an extremely small potential performance improvement. Details:… – flickerfly Aug 6 '14 at 19:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.