?
Solved

How do i can apply security on  LINUX directory so that the users cannot consent to the code of my web application in the APACHE server?

Posted on 2004-04-15
6
Medium Priority
?
243 Views
Last Modified: 2010-04-22
I have a LINUX - APACHE  application and i need apply security to not allow the access to the code or root directory of my web application.  Now I have a URL: www.aaa.gov.org/bbb/ccc.html
How Can I set this URL as:
  www.aaa.gov.org

and with its security
0
Comment
Question by:jlguerra
[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
6 Comments
 
LVL 17

Accepted Solution

by:
owensleftfoot earned 172 total points
ID: 10837745
You need to edit the DocumentRoot directive in /etc/httpd.conf
0
 
LVL 10

Assisted Solution

by:Mercantilum
Mercantilum earned 164 total points
ID: 10848641
* In order to prevent a directory listing, either

1. create a index.html file in the root of your web server documents (and/or subdirs)
touch index.html

2. modify httpd.conf  and in
<Directory your-docs-path>
 Options +Indexes ....
 ....
</Directory>

Ensure +Indexes is  -Indexes
 Options -Indexes ....


* Regarding the www.aaa.gov.org/bbb/ccc.html =>  www.aaa.gov.org

1. www.aaa.gov.org is not a VH

Ensure your DocumentRoot in httpd.conf is something like
DocumentRoot  /myserverdir/asubdir/bbb
If you want ccc.html to be read as default :
either rename ccc.html as index.html or (without changing the default in httpd.conf, cleaner:) make a link in this dir to index.html
ln -s ccc.html index.html

2. www.aaa.gov.org is a virtualhost

Ensure your VH content is like
<VirtualHost *>
DocumentRoot /myserverdir/asubdir/bbb
ServerName www.aaa.gov.org
</VirtualHost>
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 164 total points
ID: 10852270
in your httpd.conf sett at least following
  DocumentRoot /path/to/bbb
  <Directory />
    Options None
    AllowOverride None
  </Directory>
  <Directory "/path/to/bbb">
    DirectoryIndex index.html
  </Directory>

If you need more security, you need to provide more details
0

Featured Post

Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

Question has a verified solution.

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

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month14 days, 1 hour left to enroll

800 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