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
236 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
6 Comments
 
LVL 17

Accepted Solution

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

Assisted Solution

by:Mercantilum
Mercantilum earned 41 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 41 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
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.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

943 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now