I've tried, but the alias seems to be overriding the virtualhost. Which kinda makes sense, but isn't what I'd like. Any suggestions on how to config apache to run a second non-matrix (ala static html) site in parallel on the same server.
Avi isn’t this dependant on how the server is configured? we used named hosting in our environment, so I have the one Virtual Host configuration for MAtrix, then just add ServerName for each URL it will listen for and this works a treat for us…
The other reason we do that is that, in Apache 1.3 there was problems with preventing TRACE method attacks and the only way to put the block in is in the virtual Host directive, as it did not like it in the mainserver configuration. This was a recommendation from a security audit we had conducted on our server so as a result each virtual host we have contains:
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
Also… I know not relevant but I thought I would just throw it in as half our network is down at the moment, and I cannot do any work, so a little bored :lol:’ /> <img src=‘http://forums.matrix.squiz.net/public/style_emoticons/<#EMO_DIR#>/rolleyes.gif’ class=‘bbc_emoticon’ alt=’:rolleyes:
[quote]Avi isn’t this dependant on how the server is configured? we used named hosting in our environment, so I have the one Virtual Host configuration for MAtrix, then just add ServerName for each URL it will listen for and this works a treat for us…
[right][post=“9298”]<{POST_SNAPBACK}>[/post][/right][/quote]
Yeah, ServerName, ServerAlias, same thing.
What I meant was, if you use a VirtualHost block, you have to edit your Apache httpd.conf if you want to add a new site. If you don’t, you can just add the site in Matrix and it will automatically work (because Apache will send EVERYTHING to Matrix, and Matrix will sort it out itself).
What I meant was, if you use a VirtualHost block, you have to edit your Apache httpd.conf if you want to add a new site. If you don’t, you can just add the site in Matrix and it will automatically work (because Apache will send EVERYTHING to Matrix, and Matrix will sort it out itself).
We have seperated out our virtual hosts from the HTTPD.conf file, and include a vhosts.conf file… which does make it a little easier to add items in… could even allow you to have a PHP admin script on the server to allow you to add a new servername entry to Matrix Virtual Host, and then do a Graceful restart on apache using su permissions etc Food for thought
If you only have one Matrix system on the server, then you could avoid this by making sure virtual host for matrix is the first one loaded into apache. This is achieved by either making it the first VirtualHost directive or making sure it is loaded first if you're loading vhost config files like include *.conf
Apache treats the first virtual host as the default and all uncaught domains are forwarded to it.
[quote]Apache treats the first virtual host as the default and all uncaught domains are forwarded to it.
[right][post=“9305”]<{POST_SNAPBACK}>[/post][/right][/quote]
I didn’t know that – that’ll come in REAL handy. Thanks!
We do that for our system too as currently with have 3 matrix instances on one box, 1 prod with lots of vhost, one for sandbox (cms-sandbox.mydomain/), one for training (cms-training.mydomain/). By having prod as the first one read, no need to add Aliases or restart Apache each time