You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by e-letter <in...@gmail.com> on 2010/10/21 13:34:47 UTC

[users@httpd] Re: possible to add multiple locations for the document root

I tried to use the command 'Alias', to try and use the program
phppgadmin which was extracted to /path/to/phppgadmin:

DocumentRoot "/var/www/html"
Alias /localhost/target /usr/local/phppgadmin/phppgadmin
<Directory /localhost/target>
Order allow,deny
Allow from all
</Directory>

After stopping and restarting the web server, when I navigate the web
brower to 'http://localhost/target' I receive an error 404 page. In
the phppgadmin directory there are various php pages, e.g. login.php:

$ ls /usr/local/phppgadmin/phppgadmin/
aciur.js            groups.php          redirect.php
aggregates.php      help/               reports.php
all_db.php          help.php            robots.txt
autocomplete.php    HISTORY             roles.php
browser.php         history.php         rules.php
BUGS                images/             schemas.php
casts.php           indexes.js          sequences.php
classes/            indexes.php         servers.php
colproperties.php   index.php           sql/
conf/               info.php            sqledit.php
constraints.php     INSTALL             sql.php
conversions.php     intro.php           tables.js
CREDITS             lang/               tablespaces.php
database.php        languages.php       tables.php
dataexport.php      libraries/          tblproperties.php
dataimport.php      LICENSE             themes/
dbexport.php        links.js            TODO
DEVELOPERS          login.php           TRANSLATORS
display.php         logout.php          triggers.php
domains.php         multiactionform.js  types.php
FAQ                 opclasses.php       users.php
fulltext.php        operators.php       viewproperties.php
functions.js        plugin_slony.php    views.php
functions.php       privileges.php      xloadtree/

What is my mistake please?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: possible to add multiple locations for the document root

Posted by Tom Evans <te...@googlemail.com>.
On Thu, Oct 21, 2010 at 12:34 PM, e-letter <in...@gmail.com> wrote:
> I tried to use the command 'Alias', to try and use the program
> phppgadmin which was extracted to /path/to/phppgadmin:
>
> DocumentRoot "/var/www/html"
> Alias /localhost/target /usr/local/phppgadmin/phppgadmin

Alias refers to the path in the URL. For the URL
'http://localhost/target', the path is '/target'.

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias

> <Directory /localhost/target>

Directory refers to physical directories on disk, not to the URL space.

http://httpd.apache.org/docs/2.2/mod/core.html#directory

> Order allow,deny
> Allow from all
> </Directory>
>
> After stopping and restarting the web server, when I navigate the web
> brower to 'http://localhost/target' I receive an error 404 page. In
> the phppgadmin directory there are various php pages, e.g. login.php:
>

Fix the above errors first.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: possible to add multiple locations for the document root

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> > On 21/10/2010, e-letter <in...@gmail.com> wrote:
> >> Alias /localhost/target /usr/local/phppgadmin/phppgadmin

On 25.10.10 14:57, Joost de Heer wrote:
> Alias /target /usr/local/phppgadmin/phppgadmin

Ehm...
Alias /target/ /usr/local/phppgadmin/phppgadmin/

trailing slashes DO have a meaning. without them, the

/target-test

would get mapped to

/usr/local/phppgadmin/phppgadmin-test

no matter if the directory exists.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
He who laughs last thinks slowest. 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: possible to add multiple locations for the document root

Posted by Joost de Heer <jo...@sanguis.xs4all.nl>.
On Mon, October 25, 2010 14:39, e-letter wrote:
> On 21/10/2010, e-letter <in...@gmail.com> wrote:
>> I tried to use the command 'Alias', to try and use the program
>> phppgadmin which was extracted to /path/to/phppgadmin:

There are some errors:

>> Alias /localhost/target /usr/local/phppgadmin/phppgadmin

Alias /target /usr/local/phppgadmin/phppgadmin

>> <Directory /localhost/target>

<Directory /usr/local/phppgadmin/phppgadmin>

>> Order allow,deny
>> Allow from all
>> </Directory>

> I received an error that permission is denied:

> What do I need to do now, please?

Read the error log, it should give more details why this request was
denied. Are you certain that you want everyone to have access to the
pgadmin website?

Joost

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: possible to add multiple locations for the document root

Posted by Rich Bowen <rb...@rcbowen.com>.
On Oct 25, 2010, at 8:39 AM, e-letter wrote:

> I received an error that permission is denied:
>
> Access forbidden!
>
> You don't have permission to access the requested object. It is either
> read-protected or not readable by the server.


This error message will be accompanied by an additional error message  
in the error_log, which will tell you either that it's because of file  
permissions (indicated by a (13) in the message) or configuration  
(indicated by "... by server configuration" in the message)



--
Rich Bowen
rbowen@rcbowen.com
http://drbacchus.com/




[users@httpd] Re: possible to add multiple locations for the document root

Posted by e-letter <in...@gmail.com>.
On 21/10/2010, e-letter <in...@gmail.com> wrote:
> I tried to use the command 'Alias', to try and use the program
> phppgadmin which was extracted to /path/to/phppgadmin:
>
> DocumentRoot "/var/www/html"
> Alias /localhost/target /usr/local/phppgadmin/phppgadmin
> <Directory /localhost/target>
> Order allow,deny
> Allow from all
> </Directory>
>
> After stopping and restarting the web server, when I navigate the web
> brower to 'http://localhost/target' I receive an error 404 page. In
> the phppgadmin directory there are various php pages, e.g. login.php:
>
> $ ls /usr/local/phppgadmin/phppgadmin/
> aciur.js            groups.php          redirect.php
> aggregates.php      help/               reports.php
> all_db.php          help.php            robots.txt
> autocomplete.php    HISTORY             roles.php
> browser.php         history.php         rules.php
> BUGS                images/             schemas.php
> casts.php           indexes.js          sequences.php
> classes/            indexes.php         servers.php
> colproperties.php   index.php           sql/
> conf/               info.php            sqledit.php
> constraints.php     INSTALL             sql.php
> conversions.php     intro.php           tables.js
> CREDITS             lang/               tablespaces.php
> database.php        languages.php       tables.php
> dataexport.php      libraries/          tblproperties.php
> dataimport.php      LICENSE             themes/
> dbexport.php        links.js            TODO
> DEVELOPERS          login.php           TRANSLATORS
> display.php         logout.php          triggers.php
> domains.php         multiactionform.js  types.php
> FAQ                 opclasses.php       users.php
> fulltext.php        operators.php       viewproperties.php
> functions.js        plugin_slony.php    views.php
> functions.php       privileges.php      xloadtree/
>
> What is my mistake please?
>
I changed the alias to 'target' and tried to open the address
'localhost/target/login.php'

As root I changed the permissions:

ls -aod /usr/local/phppgadmin/
drwxr-xr-x 3 root 4096 2010-10-20 10:12 /usr/local/phppgadmin//
ls -aod /usr/local/phppgadmin/phppgadmin/
drwxrwxrwx 11 root 4096 2010-10-20 10:12 /usr/local/phppgadmin/phppgadmin//

I received an error that permission is denied:

Access forbidden!

You don't have permission to access the requested object. It is either
read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
localhost
mod-xslt/1.3.8 Apache/2.2.6 (Mandriva Linux/PREFORK-8.2mdv2008.0)

What do I need to do now, please?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org