<div dir="ltr">I did have a virtualhost setup for example but only as ServerName example and I have since removed it from sites-enabled, Is mod_alias the best of way of doing it anyway? heres my VH config<br><br><VirtualHost <a href="http://foo.com:80">foo.com:80</a>><br>
ServerAdmin webmaster@localhost<br> ServerName <a href="http://www.foo.com">www.foo.com</a><br> ServerAlias <a href="http://foo.com">foo.com</a> <a href="http://www.foo.co.uk">www.foo.co.uk</a> <a href="http://foo.co.uk">foo.co.uk</a><br>
DocumentRoot /var/www/foo<br> <Directory /><br> Options FollowSymLinks<br> AllowOverride None<br> </Directory><br> <Directory /var/www/><br> Options Indexes FollowSymLinks MultiViews<br>
AllowOverride None<br> Order allow,deny<br> allow from all<br> # This directive allows us to have apache2's default start page<br> # in /apache2-default/, but still have / go to the right place<br>
</Directory><br><br>## Put landing page redirects here<br> Redirect permanent /other <a href="http://www.foo.com/">http://www.foo.com/</a><br> Redirect permanent /other2 <a href="http://www.foo.com/">http://www.foo.com/</a><br>
Redirect permanent /other3 <a href="http://www.foo.com/">http://www.foo.com/</a><br><br> Alias /example /var/www/example/<br><br>#### <br> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br> <Directory "/usr/lib/cgi-bin"><br>
AllowOverride None<br> Options ExecCGI -MultiViews +SymLinksIfOwnerMatch<br> Order allow,deny<br> Allow from all<br> </Directory><br><br> ErrorLog /var/log/apache2/lfoo-error.log<br>
<br> # Possible values include: debug, info, notice, warn, error, crit,<br> # alert, emerg.<br> LogLevel warn<br><br> CustomLog /var/log/apache2/foo-access.log combined<br> ServerSignature On<br><br> Alias /doc/ "/usr/share/doc/"<br>
<Directory "/usr/share/doc/"><br> Options Indexes MultiViews FollowSymLinks<br> AllowOverride None<br> Order deny,allow<br> Deny from all<br> Allow from <a href="http://127.0.0.0/255.0.0.0">127.0.0.0/255.0.0.0</a> ::1/128<br>
</Directory><br><br></VirtualHost><br><br>I didn't configure the server so anything could be happening but there must be a straight forward explanation.<br><br>Thanks,<br>Will<br><br><div class="gmail_quote">
On Thu, Aug 28, 2008 at 11:49 AM, Peter Corlett <span dir="ltr"><<a href="mailto:abuse@cabal.org.uk">abuse@cabal.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Thu, Aug 28, 2008 at 11:22:13AM +0100, william pink wrote:<br>
[...]<br>
<div class="Ih2E3d">> But when I reload the config and try and go to the /example it tries to<br>
> resolve <a href="http://www.example.com/example" target="_blank">www.example.com/example</a> and I can't work out what I am I doing<br>
> wrong, I have looked through the Apache documentation and can't see any<br>
> reference to this. I haven't got <a href="http://www.example.com" target="_blank">www.example.com</a> in my /etc/hosts so I amm<br>
> not sure where it is getting it from?<br>
<br>
</div>You've not really given us enough information, but I'd bet that you've got<br>
ServerName <a href="http://www.example.com" target="_blank">www.example.com</a> somewhere and Apache's trying to redirect there.<br>
Apache will redirect if you give it the URL of a directory without the /.<br>
(It needs a redirect because otherwise relative URLs will be wrong.)<br>
<font color="#888888"><br>
--<br>
Gllug mailing list - <a href="mailto:Gllug@gllug.org.uk">Gllug@gllug.org.uk</a><br>
<a href="http://lists.gllug.org.uk/mailman/listinfo/gllug" target="_blank">http://lists.gllug.org.uk/mailman/listinfo/gllug</a><br>
</font></blockquote></div><br></div>