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. |
|
 |
07-30-2006, 03:26 PM
|
#1
|
|
Member
Registered: Nov 2005
Posts: 63
Rep:
|
Seting up server Apache Gentoo
I am attempting to set up a server in gentoo with apache (I previously had it working on a windows machine, but am migrating it to a linux machine in attempt to save headache). I have followed the setup instructions on the gentoo wiki to set up apache for virtual hosts. I put a website on this host (mclinkor.mit.edu (18.248.3.123)), and can view it from the local machine, but I cannot view it from other machines. I have not assigned DNS servers, but I'm not sure if that matters (since I can access the internet on the server machine), but I when I was given my static ip, they gave me DNS servers, so maybe this is important. Is there anything else I have to do security-wise to open up gentoo to allow other computers to access apache? Thanks.
- Ryan
|
|
|
|
07-30-2006, 04:31 PM
|
#2
|
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
By default, the server root is in /var/www/localhost/htdocs
vhost definitions will also be in /etc/apache2/vhosts.d and are read in numeric order.
ADDED: I suppose I should ask which version of apache you have installed..
Last edited by peter_robb; 07-30-2006 at 04:53 PM.
|
|
|
|
07-30-2006, 05:22 PM
|
#3
|
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
The server accesses ok on the ip number, so the default server is working ok.
What have you used to define the url host?
|
|
|
|
07-30-2006, 07:06 PM
|
#4
|
|
Member
Registered: Nov 2005
Posts: 63
Original Poster
Rep:
|
Apache version 2.0.54
Here's my vhost file
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mclinkor.mit.edu
DocumentRoot "/hosted_sites/mclinkor"
</VirtualHost>
[and the appropriate ones for 127.0.0.1]
What do you mean by what I have used to define the url host?
Thanks.
|
|
|
|
07-30-2006, 07:49 PM
|
#5
|
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
That's the default host.. *:80
You need a host with the url name you want to access the vhost with, eg www.some.thing.com
eg,
/etc/apache2/vhost.d/00_default_vhost.conf reads as above
/etc/apache2/vhost.d/10_www.mclinkor.mit.edu.conf reads;
<VirtualHost *:80>
ServerName www.mclinkor.mit.edu
DocumentRoot hosted_sites/mclinkor
</VirtualHost>
Last edited by peter_robb; 07-30-2006 at 07:56 PM.
|
|
|
|
07-30-2006, 11:03 PM
|
#6
|
|
Member
Registered: Nov 2005
Posts: 63
Original Poster
Rep:
|
OK, I made those changes, but it still doesn't work.
This has solved the problem of it not saying "NameVirtualHost *:80 has no VirtualHosts"
Note that my address is http://mclinkor.mit.edu, not www.mclinkor.mit.edu
|
|
|
|
07-31-2006, 06:11 AM
|
#7
|
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
Ok so you will need to have..
in /etc/apache2/vhost.d/10_mclinkor.mit.edu.conf
<VirtualHost *:80>
ServerName mclinkor.mit.edu
DocumentRoot hosted_sites/mclinkor
</VirtualHost>
|
|
|
|
07-31-2006, 07:35 AM
|
#8
|
|
Member
Registered: Nov 2005
Posts: 63
Original Poster
Rep:
|
Yeah, that's what I ended up doing.
Unfortunately, still no dice.
Are there any other security permissions that gentoo generally sets up? Like, a does a basic stage3 install include any kind of firewall or anything that I need to configure?
|
|
|
|
08-06-2006, 01:29 PM
|
#9
|
|
Member
Registered: Nov 2005
Posts: 63
Original Poster
Rep:
|
So I eventually got this working (since I was stupid and forgot to restart net.eth0 after making some changes there and fixing the above errors.
Now I have a new problem.
I have two static ip addresses that I have configured in net file. I have these connected to hostnames. The old ip address works fine (and links to the three virtual hosts perfectly).
I have another static ip, however which links to another virtual host, which I can only see on the local computer (which seems like the problem I was having before, but the fixes don't work for it).
Basically, to go from one static ip to two, I changed things like *:80 to 18.248.3.137:80.
Is there something else I am missing regarding setting up multiple ip addresses (or maybe I forgot to do something that I did to set-up my original ip, but I've looked back over what I did for that and it hasn't helped).
Thanks.
|
|
|
|
08-07-2006, 05:17 AM
|
#10
|
|
Senior Member
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458
Rep:
|
Have a look at http://www.tldp.org/HOWTO/Adv-Routing-HOWTO/
Especially the section about split routing and multiple gateways.
|
|
|
|
08-08-2006, 01:02 AM
|
#11
|
|
Member
Registered: Nov 2005
Posts: 63
Original Poster
Rep:
|
OK, I fixed the problem.
I used the first method, rather than the second, to set up my ip addresses as described here:
http://gentoo-wiki.com/HOWTO_IP_Aliasing
|
|
|
|
| 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:21 AM.
|
|
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
|
|