Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-04-2004, 11:37 PM
|
#1
|
|
Member
Registered: Nov 2003
Location: London
Distribution: Ubuntu
Posts: 35
Rep:
|
Mandrake 9.2, hosting web page behind router on dynamic ip
Hi, not sure where to start with this... I have an ADSL Router with a dynamic IP address. Behind it sits the LAN. On the LAN I have one server from which I would like to serve web pages. I have configured NAT on the router to forward port 80 to the internal server address. I have also registered a domain name from no-ip.com and running their program on the server to update their DNS with my new IP address. I can now connect to my web server from the Internet by using the domain name.
The problem that I am having is that I have also configured Apache to serve pages from each user's directory, and when somebody tries to access ie: mydomain.com/~user the page is served but the address bar in the browser changes to 127.0.0.1/~user . Is it possible to configure the server somehow so that both the computer and Apache know they are on a domain (ie mydomain.com), so that the address bar in browsers always displays mydomain.com/blah/blah.
|
|
|
|
01-05-2004, 12:16 AM
|
#2
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
You need to use virtual hosts on the apache server
|
|
|
|
01-05-2004, 12:17 AM
|
#3
|
|
Member
Registered: Oct 2003
Location: USA Fresno Callifornia
Distribution: Gentoo (workstation), ArchLinux (file/mail server), Freebsd (web server), Ubuntu (laptop)
Posts: 115
Rep:
|
Hi,
Make sure that you have a line in your httpd.conf file that looks like this
ServerName server.name.com:80
Also check if it exhibits this same behavior when connecting from a computer that is not on your local network.
|
|
|
|
01-05-2004, 05:38 AM
|
#4
|
|
Member
Registered: Nov 2003
Location: London
Distribution: Ubuntu
Posts: 35
Original Poster
Rep:
|
I did change the ServerName in the conf file and it now works. Thank you.
I do have virtual hosting enabled. I have another question - If I wanted to set another domain name to point to my /home/username/www directory what would the syntax be. I had a look at the virtual hosting options but not sure how to change them to map a different domain to a user's directory, not to some directory in /var/www/html
|
|
|
|
01-05-2004, 08:31 AM
|
#5
|
|
Member
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 434
Rep:
|
I have an example at work, just send me a reminder at ugob at camo-route dot com and I'll send it to you.
What I used to make it:
http://httpd.apache.org/docs/vhosts/
What I realized:
-When you make one virtual host, the main server seems to be ignored (so you have to make a virtual host directive for each domain.
-VirtualHosts seems to be treated in order in the file.
|
|
|
|
01-05-2004, 06:59 PM
|
#6
|
|
Member
Registered: Nov 2003
Location: London
Distribution: Ubuntu
Posts: 35
Original Poster
Rep:
|
Thanks,
that's the problem I had when configuring virtual hosts. I included another virtual host for the original server and now I can use to domains on different directories.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:09 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|