Hi there,
Anyone running apache with a domain name that has multiple sub-domains (Gareth->Linux.com, desktops.linux.com.... rings a bell)?
I've got www.linuxnewbie.com working fine with documentroot pointing at /www/lnc, and I'd like to get my.linuxnewbie.com pointing at /www/lnc/my.
Problem is very basic: my.linuxnewbie.com/images/ and my.lnc/whatever no longer work for obvious reason (unless I put horrible symlinks in). I gather this can be overcome with the RewriteEngine/RewriteRule directives, but Apache complains they're not recognised.
This has to be a fairly basic thing to do. Anyone able to help?
Thanks and Merry Christmas to you all!
On Thu, 23 Dec 1999 jg@cyberstorm.demon.co.uk wrote:
Problem is very basic: my.linuxnewbie.com/images/ and my.lnc/whatever no longer work for obvious reason (unless I put horrible symlinks in).
Do you want my.linuxnewbie.com/images pointing to /www/lnc/my/images or to /www/lnc/images/ ?
If the former, try setting www.linuxnewbie.com up as a virtual server in it's own right; if the latter, gawd knows! ;-)
Thanks and Merry Christmas to you all!
Indeed - have a good one, all.
Andrew.
----------------------------------------------------------------------------- A.Savory at uea.ac.uk All views are my own - who else would want them? -----------------------------------------------------------------------------
[ This email came to you via the Anglian Linux User Group list ] [ If you only wish to recieve event announcements, email the ] [ SUBJECTs of "unsubscribe alug" and "subscribe alug-announce" ] [ to listserver@stu.uea.ac.uk -- We do need your support, tho' ]
On Thu, 23 Dec 1999, Andrew Savory wrote:
On Thu, 23 Dec 1999 jg@cyberstorm.demon.co.uk wrote:
Problem is very basic: my.linuxnewbie.com/images/ and my.lnc/whatever no longer work for obvious reason (unless I put horrible symlinks in).
Do you want my.linuxnewbie.com/images pointing to /www/lnc/my/images or to /www/lnc/images/ ?
I want my.linuxnewbie.com/images pointing to /www/lnc/images
hence the problem.
If the former, try setting www.linuxnewbie.com up as a virtual server in it's own right; if the latter, gawd knows! ;-)
That was done a very long time ago.
On 23-Dec-99 jg@cyberstorm.demon.co.uk wrote:
Hi there,
Anyone running apache with a domain name that has multiple sub-domains (Gareth->Linux.com, desktops.linux.com.... rings a bell)?
I've got www.linuxnewbie.com working fine with documentroot pointing at /www/lnc, and I'd like to get my.linuxnewbie.com pointing at /www/lnc/my.
Problem is very basic: my.linuxnewbie.com/images/ and my.lnc/whatever no longer work for obvious reason (unless I put horrible symlinks in). I gather this can be overcome with the RewriteEngine/RewriteRule directives, but Apache complains they're not recognised.
SEt up a virtual server. For the virtual server you can make the document root anywhere you like. I generally like to give each virtual server its own CGI directory, whcih is *not* in the main html tree. It might be ~user/local-cgi when the html tree is ~user/public_html.
I also like to give each virtual server its own log file.
The necessary steps are:
1. Create the DNS entries for the new host name. These will probably be CNAME pointers to your main IP. For instance:
; /var/named/named.hosts
@ IN SOA panache-eth.DOMAIN. raph.panache.demon.co.uk. ( 1999008051 ; serial 86400 ; refresh interval 3600 ; retry interval 3600000 ; expire - 42 days 604800 ; minimum 1 week ) IN NS panache-eth.DOMAIN. ; ; loopback address panache-eth IN A 172.16.1.1 IN MX 0 172.16.1.1 craft IN CNAME panache-eth raph IN CNAME panache-eth www IN CNAME panache-eth birse IN CNAME panache-eth
2. Create the necessary directories. Mode should be at least 555.
3. Amend httpd.conf, and restart apache. Sample: # Define the new 'virtual' host. Port 80 is used by default <VirtualHost academy.webwright-uk.com> ServerAdmin webmaster@webwright.n-e-t.co.uk # Define the vrtual document root. Somwherre that the owner can get at. DocumentRoot /home/academy/public_html ServerName academy.webwright-uk.com # Define the log files. ErrorLog /var/httpd/logs/error_log TransferLog /var/httpd/logs/academy.access_log # Give him a privat CGI directory <Directory /home/academy/local-cgi> AllowOverride None Options ExecCGI </Directory> # The private CGI is given a useful alias. /local-cgi and /cgi-bin are # both accessible ScriptAlias /local-cgi/ /home/academy/local-cgi/ # A private icons directory. The name conflicts with the global one and so # will replace it, not supplement it Alias /icons/ /home/academy/public_html/icons/ </VirtualHost>