Solved: .htaccess Redirect webapp

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Solved: .htaccess Redirect webapp

Postby lassenloop » Sun Sep 08, 2013 7:51 pm

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]
Last edited by lassenloop on Wed Sep 11, 2013 6:11 pm, edited 1 time in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: .htaccess Redirect webapp

Postby bigfoot65 » Mon Sep 09, 2013 3:47 am

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.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

lassenloop
Posts: 65
Joined: Fri Apr 22, 2011 3:20 pm

Re: .htaccess Redirect webapp

Postby lassenloop » Wed Sep 11, 2013 6:11 pm

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.

Who is online

Users browsing this forum: No registered users and 16 guests