Solved

Using webserver Redhat 9.0

Posted on 2003-11-27
15
593 Views
Last Modified: 2013-12-16
Hi,

how do I use the webserver in redhat 9.0 I have it installed but do not know how I can test my HTML/CGI files using it. I am only planning on using it locally and not putting it online.

Thanks,

Paul
0
Comment
Question by:Paulmul
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
15 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 9831911
Assuming your webserver is apache, find your config file (httpd.conf), which might be in /usr/local/apache/conf or /etc/apache/conf, and in it set your DocumentRoot to the directory your HTML files are stored
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832155
My linux isn't great, could you explian that a little simpler, how to do it?

Thanks
0
 
LVL 18

Expert Comment

by:liddler
ID: 9832192
first do you know where your httpd.conf file is?
If not
find / -name httpd.conf

Do you know whether you are running apache 1.3 or 2?

Then in the file, you need a directives like:

ServerName www.example.com
DocumentRoot /var/www/http

If you are not sure, post your httpd.conf here
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 1

Author Comment

by:Paulmul
ID: 9832266
I don't even know if it is apache, I just installed what came with the redhat 9.0 cd. I found my httpd.conf it is a very long file. I will post it if you like but if you tell me what part to post or where I should write this in I can do that.

Thanks
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832276
Found <URL:http://httpd.apache.org/docs-2.0/> in the file, I suppose that means it i s apache 2.0

Paul
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832369
Ok I made some progress on my own. I have found my httpd directory. Should I set up cgi-bin and html folders in here?
0
 
LVL 18

Expert Comment

by:liddler
ID: 9832444
Yes,
Most of the default httpd.conf file is commented out and it has lots of comments in it trying to explain to you what is does.
Really you should try and read them (I know it is long and boring)
You can make a copy of the httpd.conf file with out the comments in by doing this
grep -v ^# httpd.conf >httpd.conf.new
mv httpd.conf httpd.conf.old
mv httpd.conf.new httpd.conf
This will be a much smaller and simpler file, then if you don't understand any of the directives, go to the relevent section of the httpd.conf.old file or look at the directions section on the apache website.

There should be a logs directory next to the conf directory where you found the httpd.conf, try and start apache (apachectl start) and look in the errors file
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832683
I found (I know I'm lazy) a www folder with http and cgi-bin sub directories. I assume this is my webserver. I have put files in the relevant directories but when I try to run perl it just opens the file, how do I change this?

Also I upped the points since this is technically another question.

Paul
0
 
LVL 18

Expert Comment

by:liddler
ID: 9832756
Yes thats where you can put your html & cgi docs.
You should have another file in the conf directory called mime.types, this will associate different extensions (i.e. .cgi or .pl) with different applications

0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832792
Ok I found that, how do I add perl to it? When I add perl should the webserver see .pl and .cgi files?
Do I have to start apache or is that running?

Sorry about all the questions.
0
 
LVL 18

Accepted Solution

by:
liddler earned 80 total points
ID: 9832853
Something like
application/perl    pl
You need to start apache (apachectl start)
0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832913
When I type that it says command not found, I have tried it in several directories including the one where apachectl is located.

0
 
LVL 1

Author Comment

by:Paulmul
ID: 9832957
I'm getting closer, Still not seeing perl properly but I think I nearly have it.

Thanks again
0
 
LVL 18

Expert Comment

by:liddler
ID: 9833119
IF you are in a directory (any directory) and you want to run a command that is located in that directory, you need to prepend your command with ./
so in the apache bin direcetory type
./apachectl start
0
 

Expert Comment

by:memdy
ID: 9924213
in RedHat 9 you can type

service httpd start

from the command line to get Apache started or

service httpd restart

to restart the Apache service if you have made any changes to the /etc/httpd/conf/httpd.conf file
0

Featured Post

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question