Page 1 of 1

Solved: .htaccess Redirect webapp

Posted: Sun Sep 08, 2013 7:51 pm
by lassenloop
I am running a webapp (PyTiVo). It is a python program that is accessed via port 9032. My Amahi box is on Ubuntu 12 LTS, running Amahi 6. I created a "New Web App" via the Amahi web interface. In the html folder for that app (/var/hda/web-apps/pytivo/html) I wrote a .htaccess file similar to the one used in the webmin Amahi app (see code below). However, when I point my browser to http://pytivo I get a page that say "Internal Server error." But if I point my browser to http://pytivo:9032 I can access the pyTiVo interface.

Does anyone see a reason why the .htaccess isn't working?

Code: Select all

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule (.*) https://%{HTTP_HOST}:9032 [R,L]

Re: .htaccess Redirect webapp

Posted: Mon Sep 09, 2013 3:47 am
by bigfoot65
you must modify the ####-webappname.conf file for the app in /etc/httpd/conf.d directory to include this text between the <directory></directory> tags:
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride FileInfo Limit Options Indexes
Order allow,deny
Allow from all
Remove the old and replace with the new. Then restart apache.

Re: .htaccess Redirect webapp

Posted: Wed Sep 11, 2013 6:11 pm
by lassenloop
you must modify the ####-webappname.conf file for the app in /etc/httpd/conf.d directory to include this text between the <directory></directory> tags:
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride FileInfo Limit Options Indexes
Order allow,deny
Allow from all
Remove the old and replace with the new. Then restart apache.
Solved. Thank you.