?
Solved

Apachi Web Server, where are web pages stored?

Posted on 1998-09-10
7
Medium Priority
?
311 Views
Last Modified: 2013-12-15
I'd like to know the path to where web pages are stored on the Red Hat 5.1 Apachi installation. I would also like to know something about the permissions, storage, and handling of web content. Should the files be seperated into directories, such as jpg's and gif's into seperate directories from html. What permissions do the files need, who needs to own them, or does it matter?  I'm just interested in getting enough info to start to use it as an Intranet web server and don't want any surprises. Please don't post your comments as an answer. I will award the question to what I view as the best answer and then ask for it to be reposted.
0
Comment
Question by:joe_massimino
[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
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630747
The default directory for .html docs is "/home/httpd/html" but you can override it in your /etc/httpd/conf/srm.conf in the DocumentRoot entry. (read /etc/httpd/conf/*.conf, they have VERY detailed documentation). You can also point your favourite browser to http://your_host/manual/ (in bash: "lynx http://localhost/manual/")

About permissions, the files need to be readable by everybody ("chmod -R +r /home/httpd/html") for the server to work. I'd suggest you to:
1) create a special group ("groupadd web")
2) add every login who should put files in your web site to that group ("usermod -G web,listOfPreviousAditionalGroups user")
3) change group of html dir ("chgrp web /home/httpd/html")
4) setgid same dir ("chmog g+s /home/httpd/html")

With redhat default permissions you won't have problems sharing web site administration among several users.

About directories: this is a matter of how you feel more confortable with files/dirs. For the web server there's not much difference between html source and images (unless you user an embedded languaje in your pages). Subdirectories may help you to have webmasters with very specific responsibilities...

Good luck
0
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630748
Sorry:
4) setgid same dir ("chmog g+s /home/httpd/html") should read: "chmod g+s ..."
0
 
LVL 6

Author Comment

by:joe_massimino
ID: 1630749
Thanks for the quick response. I will review the info you have here and see how far it gets me.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 6

Author Comment

by:joe_massimino
ID: 1630750
Go ahead and repost this as an answer.  Thanks
0
 
LVL 3

Accepted Solution

by:
marcelofr earned 480 total points
ID: 1630751
enjoy Linux...
0
 
LVL 6

Author Comment

by:joe_massimino
ID: 1630752
Can you shed any lite on making my public_html directories work with the proper permissions.  I tried    chmod 644 public_html
but that didn't help me any.  When I browse the linux box, running apachi, I just get the default apachi file, not the users public_html, no matter how I type the URL.  If you like, I can post this as another question.
0
 
LVL 3

Expert Comment

by:marcelofr
ID: 1630753
In the default configuration, your web server is running as "nobody" so it needs read permissions in the filesin public_html, also you need "eXecution" permission for "other" in ALL of the subdirectories involved: for joeuser you'll need:

chmod +x /home
chmod +x /home/joeuser
chmod +x /home/joeuser/public_html
chmod +r /home/joeuser/public_html/*

and last but not least, in your /etc/httpd/conf/srm.conf you need the "magic entry: "UserDir public_html".

Given all this conditions and having HUP'ed (killall -v -1 `cat /var/run/httpd.pid`), you can access this as:

http://web.server.com/~joeuser/page.html

Good luck
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
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.
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

752 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