LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ln -s link to webpage. (https://www.linuxquestions.org/questions/linux-newbie-8/ln-s-link-to-webpage-407308/)

Sapient 01-24-2006 05:26 AM

Alias Directive / Apache
 
Simple question. I am trying to do this:

ln -s http://www.hingedmind.com/squirrelma.../src/index.php mindmail

No matter what permissions I set for index.php (777 root:root) When I try http://www.hingedmind.com/mailmind/

I get:

Forbidden

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

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Thanks

marozsas 01-24-2006 06:20 AM

The command ln is designed to link files on a local file system. The url http://www.hingedmind.com/squirrelma.../src/index.php is not a file neither local.

The right way to do that using KDE (others display managers can do similar) is open the url in konqueror and drag-and-drop the tiny icon in front of the url in location bar to the desktop and choose link here.

After that you can access the page just clicking on the icon in Desktop.

regards,

Sapient 01-24-2006 06:25 AM

Quote:

Originally Posted by marozsas
The command ln is designed to link files on a local file system. The url http://www.hingedmind.com/squirrelma.../src/index.php is not a file neither local.

The right way to do that using KDE (others display managers can do similar) is open the url in konqueror and drag-and-drop the tiny icon in front of the url in location bar to the desktop and choose link here.

After that you can access the page just clicking on the icon in Desktop.

regards,


Thanks for the response Marozzsas.
I am not looking for a short-cut. I am looking for a link so that my mail users d not have to type the actual path.

i.e. http://www.hingedmind.com/squirrelma.../src/login.php ---> http://www.hingedmind.com/mindmail

I am beginning to think this is an Apache question....

nx5000 01-24-2006 06:29 AM

Yes that's an apache question, exactly.

You need to use an Alias directive

if the destination is out of DocumentRoot you also need to put this directory somewhere in the configuration (I can't remember the exact direcctive for this one sorry)

edit:
look here
http://www.linuxquestions.org/questi...d.php?t=406893

Sapient 01-24-2006 08:24 AM

Apache directive
 
What am I doing wrong here?

I simply want to go here http://www.hingedmind.com/folder/mail/login.php ---> when this is typed http://www.hingedmind.com/webmail

Alias /webmail/ "/srv/www/htdocs/hingedmind/folder/mail/"
<Directory "/srv/www/htdocs/hingedmind/folder/mail">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex index.php
</Directory>

nx5000 01-24-2006 09:19 AM

Code:

<Directory "/srv/www/htdocs/hingedmind/folder/mail/">
He's very picky about directory names :)

I think this is the problem.

Sapient 01-24-2006 09:45 AM

I changed a few things. Still no luck. I get an "Object not found" error in the browser when I attempt to http://www.hingedmind.com/webmail. Also the URL changes to

http://www.hingedmind.com/index.php

Alias /webmail "/srv/www/htdocs/hingedmind/folder/mail/"
<Directory "/srv/www/htdocs/hingedmind/folder/mail/">
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
DirectoryIndex index.php redirect.php login.php
AllowOverride None
Order allow,deny
Allow from all
</Directory>

nx5000 01-24-2006 09:55 AM

Are you sure the destination exists and you can access it?
I mean, assuming Documentroot is /srv/www/htdocs/hingedmind , it seems that
http://www.hingedmind.com/folder/mail/
does not work (took the permission to go on your website :)
?

KimVette 01-24-2006 09:55 AM

You need to enable the FollowSymLinks option. See:

http://httpd.apache.org/docs/1.3/mod/core.html

nx5000 01-24-2006 10:01 AM

as I said in a previous post , I think you only need a directory directive if it is outside your docroot.
Its been a while I've not used the amazing apache, so correct me if Im wrong..

Sapient 01-24-2006 06:13 PM

Thanks KimVette and nx5000,
I should explain a little more about the configuration. I used obscure names to keep it simple. I want to call squirrelmail from the browser http://www.hingedmind.com/minmail

The actual path is srv/www/htdocs/hingedmind/squirrelmail-1.4.5/src or http://www.hingedmind.com/squirrelma.../src/login.php

The document root is /srv/www/hrdocs/hingedmind (I should change this to /srv/www/htdocs for virtual hosting). This does put squirrelmail within the document root (to answer your queston nx5000).

Current configuration: I looked at the directives page and in particular FollowSymLinks and it was enabled earlier (unless I am not seeing what you are pointing to).

Alias /mindmail "/srv/www/htdocs/hingedmind/squirrelmail-1.4.5/src"

<Directory "/srv/www/htdocs/hingedmind/squirrelmail-1.4.5/src">
Options Indexes FollowSymLinks
DirectoryIndex index.php redirect.php login.php
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Sapient 01-25-2006 05:44 AM

Perhaps a virtual host is needed.

nx5000 01-25-2006 06:01 AM

No need for virtual host.

What you did should work, I don't get it.
Did you look at the logs?

*IF* you use the other method of a symbolical link (you have minmail a link to squirelmail/src) then the FollowSymLink has to be for the documentRoot , not for the destination!

Sapient 01-25-2006 06:21 AM

Apache2 Error Log: (this is all that is showing in any logs).

[Wed Jan 25 04:14:39 2006] [error] [client 24.176.227.138] client denied by server configuration: /srv/www/squirrelmail-1.4.5

hmmm the path is weird...

Sapient 01-25-2006 10:20 PM

I am not sure why the logs are reflecting that path. Should the root directory go up a level?


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