Forum

How to use Alias?

Samiux
31 August 2009, 08:51


Hiawatha version: 6.16
Operating System: Ubuntu 9.04 Server

Hi,

I am new to Hiawatha. My webserver is running several websites using VirtualHost. I would like to run phpmyadmin also. The phpmyadmin is situated at /usr/share/phpmyadmin. I would like to run it as http://www.my_web_domain.com/applepie.

My setting is as the following :

Hostname = www.my_web_domain.com
Alias = /applepie:/usr/share/phpmyadmin
WebsiteRoot = /var/www/my_site_root


However, I cannot run phpmyadmin by http://www.my_web_domain.com/applepie. Would you mind telling me how to solve this problem?

Thank you.

Samiux
Hugo Leisink
31 August 2009, 08:54
What errors you do recieve? What information is in the error logfile?
Samiux
31 August 2009, 09:40
Hugo Leisink,

I do received 404 error page.

I will check the error logfile for further information later as I am on the road.

Samiux
Hugo Leisink
31 August 2009, 09:42
Have you set the StartFile to index.php? You should have something like this:
CGIhandler = /usr/bin/php-cgi:php

Hostname = www.my_web_domain.com
Alias = /applepie:/usr/share/phpmyadmin
WebsiteRoot = /var/www/my_site_root
StartFile = index.php
ExecuteCGI = yes


Don't forget to install the CGI version of PHP. How to get a PHP website running is explained in the HOWTO. Please read that first before posting here.
Samiux
31 August 2009, 18:36
Hugo Leisink,

Strange enough, I can see phpmyadmin with the following setting by (1) http://www.my_web_domain.com and (2) http://www.my_web_domain.com/applepie.

ServerId = www-data


FastCGIserver {
FastCGIid = PHP5
ConnectTo = 127.0.0.1:2005
Extension = php, php5
SessionTimeout = 30
}


VirtualHost {
Hostname = www.my_web_domain.com
Alias = /applepie:/usr/share/phpmyadmin
WebsiteRoot = /usr/share/phpmyadmin
StartFile = index.php
ExecuteCGI = yes
AccessLogfile = /var/log/hiawatha/my_web_domain/access.log
ErrorLogfile = /var/log/hiawatha/my_web_domain/error.log
TimeForCGI = 5
UseFastCGI = PHP5
UseToolkit = banshee
ExecuteCGI = yes

PreventCSRF = yes
PreventSQLi = yes
PreventXSS = yes
}


I did not change the content of "banshee" at UseToolKit section. I also uncommented all the Ban* entries. If I set the WebsiteRoot to /var/www/my_site_root, a 404 Not Found page appears.

Another matter I also encountered is the ownership of log files at /var/log/hiawatha are nobody:nogroup. There are no entry inside even I displayed the welcome page of Hiawatha. The log files at /var/log/hiawatha/my_web_domain are created by me with the same ownership. However, there is no entry inside also.

Any suggestion?

Samiux
Samiux
1 September 2009, 04:39
Hugo Leisink,

Sorry for brothering you so much. The Alias works when I make correction to Apparmor setting.

By the way, there is no entry in the log files still. Any suggestion?

Samiux
Samiux
1 September 2009, 18:23
Hugo Leisink,

Sorry for brothering you again.

I forgot to create a suitable directory for my customized log files before installing Hiawatha package. Therefore, Hiawatha do not know the path.

I solved the problem by creating the directory and reinstall the package. The log files then have entries.

Thank you for your hard work to this project.

Samiux

P.S. I will try Banshee later!
This topic has been closed.