Apache Web Server: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
* On this file, you just need to define your virtual host, nothing else is required. | * On this file, you just need to define your virtual host, nothing else is required. | ||
* You don't need to duplicate the default_vhost.include which is in fact included from httpd.conf. | * You don't need to duplicate the default_vhost.include which is in fact included from httpd.conf. | ||
== webapp-config == | |||
* webapp-config is a Gentoo only tool to allow a single web applications to be correctly installed into multiple virtual hosts. This is nice as it allows the code to remain on a standard, Portage managed place while you can easily deploy your web applications into production. | |||
* Currently the way it works is by creating a directory corresponding to the application inside the specified virtual host. By default it will be installed in /var/www/<virtual_host_name>/htdocs; you can configure that by editing /etc/vhosts/webapp-config. I use the following convention: | |||
vhost_root="/srv/${vhost_subdomain_2}.${vhost_subdomain_1}/" | |||
vhost_htdocs_insecure="./" | |||
* The only problem is that webapp-config always creates icons, error, and cgi-bin directories in the virtual host directory if they are not there. I would prefer that not to happen. |
Revision as of 13:36, 8 February 2008
Apache on Gentoo
- Add the ServerName directive to the main configuration file (httpd.conf)
- To create a virtual host, just create a new file in /etc/apache2/vhosts.d/ with the name starting with 2 digits. For example:
01_images.shoopz.com.conf
- On this file, you just need to define your virtual host, nothing else is required.
- You don't need to duplicate the default_vhost.include which is in fact included from httpd.conf.
webapp-config
- webapp-config is a Gentoo only tool to allow a single web applications to be correctly installed into multiple virtual hosts. This is nice as it allows the code to remain on a standard, Portage managed place while you can easily deploy your web applications into production.
- Currently the way it works is by creating a directory corresponding to the application inside the specified virtual host. By default it will be installed in /var/www/<virtual_host_name>/htdocs; you can configure that by editing /etc/vhosts/webapp-config. I use the following convention:
vhost_root="/srv/${vhost_subdomain_2}.${vhost_subdomain_1}/" vhost_htdocs_insecure="./"
- The only problem is that webapp-config always creates icons, error, and cgi-bin directories in the virtual host directory if they are not there. I would prefer that not to happen.