Playing with my new server I keep running into trouble I'll give the support geeks some rest and bugger you guys instead this time It's RHEL v3. Here's my folder structure. /var/web/mydomain.com/public/www (this is the Virtual Server's document root for mydomain.com - load the www.mydomain.com in the browser and it resolves just fine). Hoewever, I also have: /var/web/mydomain.com/public/stats which is supposed to be stats.mydomain.com however, typing that into the browser won't resolve. My assumption that it should work by just organising it the way it used to be on my shared hosting account is obviously wrong. How do I set up subdomains on my own server? It used to be as easy as making a new folder in FTP but I haven't cracked it yet unfortunately. I'm feeling such a noob, finding things hard that used to be childsplay
I'm assuming you've already created a DNS entry for stats.yourdomain.com You need to set up an entry in Apache for it too. RHEL3 comes with Apache2 IIRC. You don't mention what stats program you're using, but it should be as simple as: <VirtualHost *:80> ServerName stats.yourdomain.com DocumentRoot /var/web/mydomain/public/stats <Directory "/var/web/mydomain/public/stats"> Options ExecCGI Order allow,deny Allow from all </Directory> </VirtualHost> Code (markup): HTH
Thanks! Do you use webmin? Under Servers, Apache, this particular server and then Directives I now see: DocumentRoot /var/web/mydomain.com/public/www ServerName mydomain.com <Directory "/var/web/mydomain.com"> allow from all Options +Indexes AllowOverride All </Directory> Code (markup): Do I just add in your bit?
If you're using webmin you can use the "Create a new virtual server" form at the bottom of the Apache module page. The DocumentRoot and ServerName variables will be as forkqueue said.
Never used webmin in my life I'm afraid, good ol vi is the only tool I need What johnt said would seem to make sense. The bit you pasted would be from your www.yourdomain.com virtual host - you want to create an entirely new one.
Seems like I just sussed it out with Webmin the way johnt explained. I complicated matters myself by not having a domain to the IP yet. So for the time being I'll use a folder down the root instead of a subdomain up the root. You learn something every day... http://subdomain.xxx.xxx.xx.xx doesn't work http://xxx.xxx.xx.xx/subfolder does
When you say that you don't have a domain to IP yet, I guess that you're waiting for the DNS changes to take effect and filter around the web. If you don't want to wait for this you can edit your hosts file to tell your PC that your new subdomain is on the specific IP address. If you're using windows, you can find your hosts file in c:\windows\system32\drivers\etc\hosts and you need to add a line like 111.222.333.444 subdomain.domain.com Code (markup): I do this all the time when setting up new domains or subdomains. cheers John
You could of course just (crontab) copy the stats to your web root every 24 hours. That way you don't need a subdomain, or to pray that webmin is doing it's thing correctly.. It also saves any mucking around with backups, it's all there in web root etc.. Just a thought Cheers, JL
It doesn't have it's own domain name yet because I'm not ready to move it but do want to set everything up. This one domain will have a whole lot of subdomains which are all restricted to office use (and those employees out and about). The webmin admin way to configure them is fine. Just seems a whole lot more complicated than I thought it'd be. Oh well