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?
Asked
Active
Viewed 4.6k times
8
fishcracker
- 201
2 Answers
13
Mimicking the Debian config system isn't difficult.
- In your Apache config, you have to include every
*.conffile in/etc/httpd/sites-enabledwith the directiveInclude sites-enabled/*.conf. - Add the config to a
*.conffile in/etc/httpd/sites-available. - Activate the site in the config file by creating a link from the relevant file in
/etc/httpd/sites-availableinto/etc/httpd/sites-enabled, which is basically the only thing thata2enabledoes on Debian.
1
Activate:
ln -s /etc/httpd/sites-available/mysite.com /etc/httpd/conf.d/mysite.com
Deactivate:
unlink /etc/httpd/conf.d/mysite.com
Bart De Vos
- 18,171