Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

closed as off-topic by HopelessN00b Jan 13 at 22:25

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. –  HopelessN00b Jan 13 at 22:25

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

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