Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've been hosting a website from my computer for a while now, and all has gone well. Now, I need to add another website. I'm not sure I understand much about virtual hosts.
My computer is connected to the internet through a router. That router currently forwards anything on port 80 to my computer (192.168.0.100). I have two registered domain names that I want to use (one for each website), both domain names are currently connected to my router's IP address. I've read about IP aliasing, but I don't know how to use that when I'm behind a router. How should I go about setting this up?
If you already have one domain name set up (through a ddns provider like http://www.dyndns.com/?) and the requests are being forwarded to your web server through your router, then you're most of the way there.
It sounds like your second domain is already pointing at your IP address, so your router will forward the request to your web server. However, your web server won't recognise the domain so the best you'd get at this point is the default web page - or just an error.
Okay, the virtual hosts seem to be pointing to the directory, but now I have another problem. Since I've added this new website, I'm having authentication problems. I've looked through my httpd.conf and I created a new password file. Authentication works for one website, but not the other.
Well, I'm at school right now, so I cant really post anything from conf files or any thing, but hear is what one of my directory setups looks like:
Code:
<Directory /srv/www/htdocs/>
Order allow,deny
Allow from all
AuthType Basic
AuthName "SuSE Server"
AuthUserFile /srvpass/apache2/.passwords
Require user user
</Directory>
This isn't exactly what I have, but it is very similar.
Alright, I figured it out, I was doing something stupid. I was using htpasswd2 -c for each new user I was adding. Every time I added someone new, the passwd file was recreated.
Everything is working fine now. Thanks for the help everyone.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.