LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-24-2007, 06:23 PM   #1
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Rep: Reputation: 32
problem with apache !!!!


hello all

iam facing aproblem with my apache i want to setup an an alias that makes me able to access the documentations out side the document root .....

first i make a dir called test at the /var and

then i creat an html file at the /var/test/index.html

PHP Code:
adam@adam-laptop:/var/testcat index.html 
<html>
<
body><P>hello</p></body>
</
html
so at the apache httpd.conf file i set an alias to make this accessible by the broweser by http://localhost/test and here is the configuration that i made >

PHP Code:
<IfModule alias_module>
    
#
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:

    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.
alias   /test   /var/test 
as shown i made alia /test /var/test


and when i get my apache up and want to access the page i got this error

Forbidden

You don't have permission to access /test on this server.


so what is the problem how ever when i doing ls -ali for the /var/test

PHP Code:
 adam@adam-laptop:/var/testls -ali
total 12
2215235 drwxr
-xr-x  2 root root 4096 2007-02-24 05:24 .
1987137 drwxr-xr-x 20 root root 4096 2007-02-24 05:24 ..
2215236 -rw-r--r--  1 adam root   42 2007-02-24 05:25 index.html 
as the shown the index.html is owned by adam which is normal user at the system so what is the problem plz
 
Old 02-24-2007, 07:10 PM   #2
ljs662_removed
Member
 
Registered: Nov 2006
Posts: 51

Rep: Reputation: 15
Hi Adam,
Your post was a little confusing and i'm not quite sure what you are trying to achieve, but apache, by default, will put your internet files into /var/www and not just /var.
So just undo anything that you have done to the apache configuration file, and stick your index.html into /var/www. That should do the trick!!!
The reason that you are getting a forbidden message is because you are trying to access a directory that apache has blocked from the public. If apache did not do this anyone could access any file on your system!
Now that wouldn't be very nice would it?
Good Luck mate I hope that helps.
Luke

Last edited by ljs662_removed; 02-24-2007 at 07:13 PM.
 
Old 02-24-2007, 07:22 PM   #3
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx for ur replay but i know that and itis not a principle that the document root is located at /var/www but it can be located at htdocs dir under apache directory where u but the installation files .

by the way all i want to do to make an alias that makes me able to access html files that located out site document root and i got a permission warning however i set the permissions for normal users in the system
 
Old 02-25-2007, 01:02 AM   #4
ljs662_removed
Member
 
Registered: Nov 2006
Posts: 51

Rep: Reputation: 15
Hmmmm?
That is weird...
Must be a problem with the config file.
 
Old 02-25-2007, 01:48 AM   #5
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
MMMmmmMMMmmMMm

am sure that my config file is working well
 
Old 02-25-2007, 06:28 AM   #6
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
Hey !

any expert her can tell me what is the problem ?
 
Old 02-25-2007, 07:01 AM   #7
henrysukumar
Member
 
Registered: Feb 2007
Location: Bangalore
Distribution: Fedora
Posts: 33

Rep: Reputation: 15
try as below,

Alias /test /var/test
<Directory /var/test>
Order allow,deny
Allow from all
</Directory>

I am very sure, but let me know whether this will help you, for more information visit http://linuxgalore.com
 
Old 02-25-2007, 07:15 AM   #8
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
i did that but still having the same problem
 
Old 02-25-2007, 11:43 AM   #9
adam_blackice
Member
 
Registered: Apr 2006
Location: /*Egypt */ //cairo
Distribution: Ubuntu 7.04 , SLED 10 , Fedora , RHEL 5
Posts: 312

Original Poster
Rep: Reputation: 32
thanx all it just working fine after adding what henry sukumar said

Alias /test /var/test
<Directory /var/test>
Order allow,deny
Allow from all
</Directory>

and changing the owner of the directory which i want to access it and it just fine
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange apache trailing / problem - Slack-current, apache 1.3.33 vamp Linux - Networking 1 01-30-2005 08:28 PM
RH9: PHP session problem (or Apache problem) fengcn Red Hat 0 12-01-2003 07:32 PM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 08:45 PM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 11:53 AM
Apache problem drjimstuckinwin Linux - Networking 2 09-05-2001 12:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration