Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Apachi Web Server, where are web pages stored?

Posted on 1998-09-10
7
Medium Priority
?
314 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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.
Suggested Courses

610 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