Virtualhost in separate file - Apache compiled

Asked

Viewed 247 times

7

Due there is a lot of VirtualHosts I have, the file on /etc/apche247/conf/extra/httdp-vhost.conf is extensive and disorganized.

I know a few ways to create the VirtualHost dynamic, but automatic installation of Apache (apt-get/yum/Pacman install), using the folder sites-enabled.

However, with Apache compiled, such folders do not exist, and I don’t know a dynamic way (without the need to include the file in the httpd.conf), to do this.

  • is not create the sites-enabled folder and at the end of the apache2.conf file put Include sites-enabled/ ?

  • @Daniellemes to be honest I do not know Daniel. I have not tested this way yet.

  • It’s the same thing they said to you down there, I guess that’s just it.

1 answer

5


Just create this folder yourself! I was also using an Apache installation that didn’t use sites-enabled, then I saw in one that used how it was done and I did the same. It’s a simple matter of creating the folder and adding the following line in httpd.conf:

Include /caminho/para/o/apache/conf/sites-enabled/

Then you can use the sites-enabled usually (i.e. a file per Virtual Host). I also suggest (if you are on a platform with symbolic links support) creating a folder sites-available, create the files there and only "link" those that are active in the sites-enabled (so you can quickly take and put websites on the air).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.