LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-25-2007, 01:26 AM   #1
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Rep: Reputation: 33
apache alias help


First:

/etc/httpd/conf/httpd.conf
file look like this(for test directory)
Quote:
Alias /test/ /tmp/test/
<Directory "/tmp/test/">
Allow from all
Order allow,deny
Allow from all
</Directory>
[root@super ~]# ls /tmp/test
index.html



http://127.0.0.1/test/

output is

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




Second:
entry in file
/etc/httpd/conf/httpd.conf

is
Quote:
Alias /nagios/ /usr/local/nagios/share/
<Directory "/usr/local/nagios/share/">
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Quote:
[root@super ~]# ls /usr/local/nagios/share/
contexthelp images main.html robots.txt ssi
docs index.html media side.html stylesheets

but again on
http://127.0.0.1/nagios/

output is:

The requested URL /nagios/ was not found on this server.


Any ideas?
Thanks.

Last edited by knockout_artist; 04-25-2007 at 01:31 AM.
 
Old 04-25-2007, 11:57 PM   #2
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 14
Posts: 71

Rep: Reputation: 15
Try this with your Alias syntax.

Alias /test "/tmp/test/"

Also make sure that /tmp/test/ has the proper permissions.

Hope this helps.
 
Old 04-26-2007, 05:13 AM   #3
mintojoseph
LQ Newbie
 
Registered: Nov 2006
Location: Kerala
Distribution: Fedora, Debian, RHEL
Posts: 29
Blog Entries: 1

Rep: Reputation: 15
One think to remember. If you have given a trailing "/" on Alias. Then you could access the url along with it.

If you have given
Alias /nagios/ /usr/local/nagios/share/

You can access
http://127.0.0.1/nagios/

not
http://127.0.0.1/nagios
 
Old 04-26-2007, 12:14 PM   #4
knockout_artist
Member
 
Registered: Sep 2005
Distribution: fedora core 9
Posts: 324

Original Poster
Rep: Reputation: 33
Thank you guys first problrm is solved.

Next is about cgi-bin

Quote:
ScriptAlias /nagios/cgi-bin/ /usr/lib/nagios/cgi-bin/
<Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
When I reach that directory from my web page

A username + password box pops up asking me for username and pwd.

I think I need some permission to go into directory.
I also need permission to execute script?
 
Old 04-26-2007, 10:42 PM   #5
jc_cpu
Member
 
Registered: May 2006
Distribution: Fedora 14
Posts: 71

Rep: Reputation: 15
The content in between the Directory tags is asking for authentication. That is why you are getting prompted for a username and password. If this is what you want, I suggest reading about htaccess in the apache manual. If you just want to access the directory without a username and password, do the following:

Replace this:

AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

With this:

AllowOverride None
Options None
Order allow,deny
Allow from all

After you do this, restart apache and it should work. Let me know if this helps.
 
  


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
Apache Alias issue Atif_Khan Linux - Server 1 02-01-2007 01:31 PM
Apache Alias Problem dave`2005 Linux - Software 6 06-02-2006 06:18 PM
Apache Alias questions xemous Linux - Networking 1 08-21-2005 09:04 AM
Apache Alias isn't working soren625 Linux - Software 3 03-07-2005 05:46 PM
Alias directive in Apache 1.3.22 mswebs Linux - Networking 2 08-01-2003 03:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:07 AM.

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
Open Source Consulting | Domain Registration