Link to home
Start Free TrialLog in
Avatar of Lia Nungaray
Lia NungarayFlag for United States of America

asked on

Setting up an intranet

I've only been working with this for a couple of days, so please bear with me.... I installed Fedora 5 along with Apache on a machine to be used as a web server. I have apache running successfully on this machine. My question is, how and where do I place the settings to allow other users in my network to view the web pages I have created? Since I will not be placing sensitive information, how can I open the site to everyone in the network? Thanks!
SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lia Nungaray

ASKER

OK, I'll read the first link, I already read the second one you suggested, but found it a little confusing. So I assume by what you're telling me that there is no one option I have to change in the httpd.config file?
the links just differ in the version of apache, 1.3.x vs. 2.0.x
that's why I gave both 'cause you didn't mention your apache version.

> .. there is no one option I have to change in the httpd.config file
i.g there is only one (AllowOverride) to change, just if you feel bad with the default settings you have to change more.
See http://httpd.apache.org/docs/1.3/mod/core.html#allowoverride also.
OK, I will read these articles after finding out the Apache version. Like I said with my first posting, all I want is for users in the network to have access to the web site. Hope I can get this working by today!
ASKER CERTIFIED SOLUTION
Avatar of periwinkle
periwinkle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(1)Yes, I have installed the apache server.
(2)Yes, I had the apache httpd.conf file configured, but while I was trying set up the access, I apparently made a change to it that now I can't start the service. To start the service, I do it from a Terminal window using the root login and password using the following statement: service httpd start.
I also made sure first that Apache was installed by typing the following command:
rpm - qa | grep httpd
(3)No, I haven't placed any files in the directory yet.

And no, I don't have a domain pointing to the server, at least I don't think I do. During the fedora installation, I asked the setup to obtain the IP address automatically. The reason I did this is that my work computer is set up this way as well. I did assign a name to the server in the httpd.conf file, I named it prod, just for grims. I also kept the original httpd.conf setting of:
Order allow, deny
Allow from all

I forgot to state this important piece of information in my question, this will be an intranet for a department in my company. The pages I have created were done in PHP, using MySQL and MSSQL as the database. They reside on my computer which, just for the sake of learning, runs XAMPP. Any help, ideas, comments to get this thing running will be greatly appreciated. I don't have any experience whatsoever setting up a web server, I was told it is quite easy, specially using a Linux box. Thanks!
What errors are in your error log after you have tried to start it?
I only get the error FAILED when starting it. Is there another way to start the service where I could see the log?
try using the apacectl command:

apachectl configtest
(will test the configuration)

apachectl start
(will start the server)

apachectl startsll
(will start the server with ssl support, if you have it properly configured)
OK, I will try your suggestion in a few more minutes and let you know. Thanks!
OK, have typed in your instructions and this is the error that I get:

[root@localhost ~]# apachectl configtest
Syntax error on line 331 of /etc/httpd/conf/httpd.conf:
order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'
[root@localhost ~]# apachectl start
[root@localhost ~]# apachectl startsll

I copied it exactly from the terminal window. I have already checked the httpd.config file, this is what I have in the section that controls who can get in the page:
#
# Controls who can get stuff from this server.
#
    Order allow, deny
    Allow all
</Directory>
Whoa... if there is an error with configtest, then it won't proceed properly.  Also, you don't do both start and startssl - only one or the other.

It looks like there here is a space between allow, and deny;  take out the space and run apachectl configtest to test it again.  

Then, if that succeeds, only do one or the other of:

apachectl start

or

apachectl startssl
OK, Apache is now working appropriately, I also created a PHP page and it loaded it successfully. Now back to my main problem, how do I configure Apache to allow everyone else in the network to see this webpage?
Kudos on getting this far!

What URL did you use to load the page?  

Do you have a static IP address on your network for your computer?
To load the page on the web server, I just used http://localhost. The page I created was just a simple phpinfo page and I named it index.php. When I loaded localhost, the phpinfo page was loaded.

I checked the network configuration on the web server and this is what I found:

Devices Tab
Nickname: eth0
Hostname(optional) prod
Automatically obtain DNS from provider (checked)

DNS Tab
HostName: localhost.localdomain
Primary DNS: 10.10.10.10
Secondary DNS: 10.10.10.11
(of course, IP's are bogus)

As you can see, I know very little, if anything, about networking. I just know that the machine is connected to the network, I can surf and see other computers in the domain. Thanks!
I'm a little foggy on this area, but I believe that you use the command

hostname

to give your system a hostname and also set the hostname in the configuration file /etc/sysconfig/network ... you may wish to put a pointer question in the Linux administration area for this.
OK, so now my second problem is giving the box a hostname. Let me find out how to do this, I'm hoping on getting this server up and running to start placing the web files in place. Give me a few minutes, I'll go check out my Linux book and post again.
Hmmm, I was under the impression that the box's hostname was defined in httpd.config under ServerName. Am I correct?
The httpd.conf file is only configuring Apache. The ServerName is used to specify WHICH domain/name is being discussed;  you can have many domains point to one box.

That doesn't help you in the way of giving the full box a name, which is done via networking, via hostname and the /etc/sysconfig/network file.  Of course, the rest of the world needs to know how to resolve that name... that's why I asked if you had assigned a static ip address for your server on your network.  It can be a local network static ip - i.e. a 192.168.x.x one - it doesn't have to be an outside IP address.

The default configuration is the first one defined;  that will catch any web server requests that come to your server even if the ServerName (or 'ServerAlias' which are 'alternative' names for that ServerName) isn't specified.  
Thanks for the info. I already posted a question on the Linux forum, lets see what these guys say.... I'll let you know.
> how do I configure Apache to allow everyone else in the network to see this webpage?
as I already said: you don't need to do anything, that's the default

> HostName: localhost.localdomain
it's a bad decision to name it "localhost", change the hostname to a real name
Then you either need to tell your DNS server to resolve that name to its IP, or you need to configure each client which want to access your linux box with a proper entry in its hosts file.

>  I was under the impression that the box's hostname was defined in httpd.config under ServerName. Am I correct?
no, you're wrong.
as already explained: httpd.conf is for apache only, it has nothing to do with the machines hostname
OK, thanks. Lot's to read!
After asking some more (reading the online manuals was getting me nowhere, I had already followed most of the instructions), I was suggested to flush the firewall rules using iptables -L, and it worked beautifully. I am able to view the initial web page from computers located on different domains. I still have a lot of reading to do, I don't deny it, but at least now I can see a dim light at the end of the tunnel!
I will divide the points evenly between ahoffman and periwinkle unless either of you have any objections, since both of you gave me usefull suggestions.  
Congratulations on getting this far!  Happy to have helped, and by all means, divide the points however you see fit!