I’m trying to completely replace the current virtual host autogenerated in httpd.conf with the following (its for a ruby app). I put this in extra.conf at the location that httpd.conf specifies for each virtual host block (its something like userdata/std/2/username/site.org/*.conf:
<VirtualHost *:80> ServerName www.site.org DocumentRoot /home/why/app/public <Directory /home/why/app/public> Allow from all Options -MultiViews </Directory> </VirtualHost>
I say ‘overwrite’ because when i run
/scripts/ensure_vhost_includes --all-users it tells me that
<VirtualHost> cannot occur within <VirtualHost> section. Obivously that means I need to reformat the virtualhost, but I am new to apache and I just want it to use what i’m including rather than trying to ‘integrate’ it with the current virtualhost. My knowledge isnt good enough to know if its doing it right, so I’d like to use exactly what I’m given from Phusion Passenger (a deployment apache module): http://www.modrails.com/documentation/Users%20guide%20Apache.html
If you add your virtual’s full config as a “Pre VirtualHost Include“, it will override the corresponding auto-generated config.
To do this, go to the “Apache Configuration” section of the Service Configuration area, and select the Include Editor. The “Pre VirtualHost Include” section is there.
Be sure to replicate all of the auto-generated configuration options that you want to keep, of course! You said that you wanted to just follow that particular recipe, but I’d take a few moments to make sure that you’re not leaving out something that’s a good idea for your particular hosting setup, etc.
Leave a comment
- Windows File Permissions and Attributes
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address