I have just installed Web-Apps Proxy, but am having problems.
For the sake of this question, lets assume the following (john being a made-up name to represent my DNS alias) is in my apps-proxy.conf file:
ServerName apps-proxy
ServerAlias apps-proxy.john.com
When I go to http://apps-proxy when on a computer in my home network I get the login page, I log in, and I get the the Amahi Home Server > Web-Apps Proxy page with the list of my installed apps. However, when I click on one of my apps I am directed to http://apps-proxy/fcms (when I click on the family connections app tab) but get, "Not Found The requested URL /fcms/ was not found on this server."
When I go to http://apps-proxy.john.com I get the same error---I am directed to http://apps-proxy.john.com/fcms with the same "Not Found" error.
I can access the family connections page from my home server by typing: http://fcms/ or http://fcms.john.com
My ultimate goal is to be able to access apps-proxy from the internet from work, but think it best to get it working from inside my home network first...
Any tips would be much appreciated.
problems with web-apps proxy
Re: problems with web-apps proxy
Do all your apps do the same, when started using http://apps-proxy ?
Some apps might not work well with apps-proxy yet. We tried many, and fixed some, but we didn't try all of them.
I'll check family connections now.
You can check that the config file of apps-proxy is correct: look in /etc/httpd/conf.d, there's a file named ####-apps-proxy.conf
That file should start with:
Following that, you should have 2 lines for each of your web-app:
Note that your browser needs to accept cookies for apps-proxy to work.
When you click a link in the apps proxy page, it sets a cookie with the hostname of the application you clicked (for example fcms), and apache will use that cookie to transform any incoming requests that look like
http://apps-proxy/ajaxterm/something or http://apps-proxy/something into a request to http://ajaxterm/something.
(The hostname you use to access apps-proxy doesn't matter. Both apps-proxy and apps-proxy.john.com should do the same when you're on your local network, and trebor.yourhda.com should do the same when accessing it via the internet.)
Some apps might not work well with apps-proxy yet. We tried many, and fixed some, but we didn't try all of them.
I'll check family connections now.
You can check that the config file of apps-proxy is correct: look in /etc/httpd/conf.d, there's a file named ####-apps-proxy.conf
That file should start with:
Code: Select all
ServerName apps-proxy
ServerAlias apps-proxy.john.com
ServerAlias trebor.yourhda.com
Code: Select all
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
When you click a link in the apps proxy page, it sets a cookie with the hostname of the application you clicked (for example fcms), and apache will use that cookie to transform any incoming requests that look like
http://apps-proxy/ajaxterm/something or http://apps-proxy/something into a request to http://ajaxterm/something.
(The hostname you use to access apps-proxy doesn't matter. Both apps-proxy and apps-proxy.john.com should do the same when you're on your local network, and trebor.yourhda.com should do the same when accessing it via the internet.)
- Guillaume Boudreau
Re: problems with web-apps proxy
I made sure that my .conf file for apps-proxy included:
ServerName apps-proxy
ServerAlias apps-proxy.john.com
ServerAlias trebor.yourhda.com
The code for my various apps was not listed in the conf file so below the ServerName and ServerAlias section I added:
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
I still get "Not Found"
For some reason it does not appear that the incoming requests are being translated properly---when I click on fcms the address that is returned is: http://apps-proxy.john.com/fcms/
Also, this error occurs for all of my listed apps which include:
Amahi Dashboard
addbook
arcadem
fcms
gallery2
joomla
transmission
webcalendar
webvnc
cookies option is turned on and translation does occur---i.e., if I type fcms or hda I get the correct access to apps I would expect.
ServerName apps-proxy
ServerAlias apps-proxy.john.com
ServerAlias trebor.yourhda.com
The code for my various apps was not listed in the conf file so below the ServerName and ServerAlias section I added:
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
I still get "Not Found"
For some reason it does not appear that the incoming requests are being translated properly---when I click on fcms the address that is returned is: http://apps-proxy.john.com/fcms/
Also, this error occurs for all of my listed apps which include:
Amahi Dashboard
addbook
arcadem
fcms
gallery2
joomla
transmission
webcalendar
webvnc
cookies option is turned on and translation does occur---i.e., if I type fcms or hda I get the correct access to apps I would expect.
Re: problems with web-apps proxy
Paste the result of the following in a new post
(Please include the executed commands too, not just their result.)
(as root):
(Please include the executed commands too, not just their result.)
(as root):
Code: Select all
cat /etc/httpd/conf.d/*apps-proxy.conf
rpm -q amahi-webapps-proxy
cat /etc/cron.d/amahi-apps-proxy
grep apps-proxy /var/log/cron | tail
/var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
/usr/bin/mysql -u root -phda -e 'SELECT name FROM webapps WHERE name != "apps-proxy" ORDER BY name ASC' hda_production | grep -v '^name$'
ls -1 /etc/httpd/conf.d/*apps-proxy.conf
cat /etc/httpd/conf.d/*apps-proxy.conf
- Guillaume Boudreau
Re: problems with web-apps proxy
That did the trick. Here is what happened:
[root@localhost robert]# cat /etc/httpd/conf.d/*apps-proxy.conf
<VirtualHost *:80>
ServerName apps-proxy
ServerAlias apps-proxy.baldwin.com
ServerAlias trebor.yourhda.com
ServerAlias hdapps.thebaldwinclan.com
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
DocumentRoot /var/hda/web-apps/apps-proxy/html
<Directory "/var/hda/web-apps/apps-proxy/html">
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/hda/web-apps/apps-proxy/logs/error_log
CustomLog /var/hda/web-apps/apps-proxy/logs/access_log combined env=!dontlog
</VirtualHost>
[root@localhost robert]# rpm -q amahi-webapps-proxy
amahi-webapps-proxy-1.0.2-1.noarch
[root@localhost robert]# cat /etc/cron.d/amahi-apps-proxy
* * * * * root /var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
[root@localhost robert]# /var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
[root@localhost robert]# /usr/bin/mysql -u root -phda -e 'SELECT name FROM webapps WHERE name != "apps-proxy" ORDER BY name ASC' hda_production | grep -v '^name$'
addbook
arcadem
fcms
gallery2
joomla
transmission
webcalendar
webvnc
[root@localhost robert]# ls -1 /etc/httpd/conf.d/*apps-proxy.conf
/etc/httpd/conf.d/1007-apps-proxy.conf
[root@localhost robert]# cat /etc/httpd/conf.d/*apps-proxy.conf
<VirtualHost *:80>
ServerName apps-proxy
ServerAlias apps-proxy.baldwin.com
ServerAlias trebor.yourhda.com
RewriteEngine On
RewriteRule ^/addbook$ http://trebor.yourhda.com/addbook/ [L]
RewriteRule ^/addbook/(.*) http://addbook/$1 [P]
RewriteRule ^/arcadem$ http://trebor.yourhda.com/arcadem/ [L]
RewriteRule ^/arcadem/(.*) http://arcadem/$1 [P]
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
RewriteRule ^/gallery2$ http://trebor.yourhda.com/gallery2/ [L]
RewriteRule ^/gallery2/(.*) http://gallery2/$1 [P]
RewriteRule ^/joomla$ http://trebor.yourhda.com/joomla/ [L]
RewriteRule ^/joomla/(.*) http://joomla/$1 [P]
RewriteRule ^/transmission$ http://trebor.yourhda.com/transmission/ [L]
RewriteRule ^/transmission/(.*) http://transmission/transmission/$1 [P]
RewriteRule ^/webcalendar$ http://trebor.yourhda.com/webcalendar/ [L]
RewriteRule ^/webcalendar/(.*) http://webcalendar/$1 [P]
RewriteRule ^/webvnc$ http://trebor.yourhda.com/webvnc/ [L]
RewriteRule ^/webvnc/(.*) http://webvnc/$1 [P]
RewriteRule ^/hda$ http://trebor.yourhda.com/hda/ [L]
RewriteRule ^/hda/(.*) http://hda/$1 [P]
RewriteCond %{QUERY_STRING} !^aproxy=.*
RewriteCond %{QUERY_STRING} !^reset$
RewriteCond %{HTTP_COOKIE} apps-proxy=([^;]+)
RewriteRule ^(.*) http://%1$1 [P]
DocumentRoot /var/hda/web-apps/apps-proxy/html
<Directory "/var/hda/web-apps/apps-proxy/html">
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/hda/web-apps/apps-proxy/logs/error_log
CustomLog /var/hda/web-apps/apps-proxy/logs/access_log combined env=!dontlog
</VirtualHost>
[root@localhost robert]# service httpd reload
Reloading httpd: [ OK ]
Thanks!
[root@localhost robert]# cat /etc/httpd/conf.d/*apps-proxy.conf
<VirtualHost *:80>
ServerName apps-proxy
ServerAlias apps-proxy.baldwin.com
ServerAlias trebor.yourhda.com
ServerAlias hdapps.thebaldwinclan.com
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
DocumentRoot /var/hda/web-apps/apps-proxy/html
<Directory "/var/hda/web-apps/apps-proxy/html">
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/hda/web-apps/apps-proxy/logs/error_log
CustomLog /var/hda/web-apps/apps-proxy/logs/access_log combined env=!dontlog
</VirtualHost>
[root@localhost robert]# rpm -q amahi-webapps-proxy
amahi-webapps-proxy-1.0.2-1.noarch
[root@localhost robert]# cat /etc/cron.d/amahi-apps-proxy
* * * * * root /var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
[root@localhost robert]# /var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
[root@localhost robert]# /usr/bin/mysql -u root -phda -e 'SELECT name FROM webapps WHERE name != "apps-proxy" ORDER BY name ASC' hda_production | grep -v '^name$'
addbook
arcadem
fcms
gallery2
joomla
transmission
webcalendar
webvnc
[root@localhost robert]# ls -1 /etc/httpd/conf.d/*apps-proxy.conf
/etc/httpd/conf.d/1007-apps-proxy.conf
[root@localhost robert]# cat /etc/httpd/conf.d/*apps-proxy.conf
<VirtualHost *:80>
ServerName apps-proxy
ServerAlias apps-proxy.baldwin.com
ServerAlias trebor.yourhda.com
RewriteEngine On
RewriteRule ^/addbook$ http://trebor.yourhda.com/addbook/ [L]
RewriteRule ^/addbook/(.*) http://addbook/$1 [P]
RewriteRule ^/arcadem$ http://trebor.yourhda.com/arcadem/ [L]
RewriteRule ^/arcadem/(.*) http://arcadem/$1 [P]
RewriteRule ^/fcms$ http://trebor.yourhda.com/fcms/ [L]
RewriteRule ^/fcms/(.*) http://fcms/$1 [P]
RewriteRule ^/gallery2$ http://trebor.yourhda.com/gallery2/ [L]
RewriteRule ^/gallery2/(.*) http://gallery2/$1 [P]
RewriteRule ^/joomla$ http://trebor.yourhda.com/joomla/ [L]
RewriteRule ^/joomla/(.*) http://joomla/$1 [P]
RewriteRule ^/transmission$ http://trebor.yourhda.com/transmission/ [L]
RewriteRule ^/transmission/(.*) http://transmission/transmission/$1 [P]
RewriteRule ^/webcalendar$ http://trebor.yourhda.com/webcalendar/ [L]
RewriteRule ^/webcalendar/(.*) http://webcalendar/$1 [P]
RewriteRule ^/webvnc$ http://trebor.yourhda.com/webvnc/ [L]
RewriteRule ^/webvnc/(.*) http://webvnc/$1 [P]
RewriteRule ^/hda$ http://trebor.yourhda.com/hda/ [L]
RewriteRule ^/hda/(.*) http://hda/$1 [P]
RewriteCond %{QUERY_STRING} !^aproxy=.*
RewriteCond %{QUERY_STRING} !^reset$
RewriteCond %{HTTP_COOKIE} apps-proxy=([^;]+)
RewriteRule ^(.*) http://%1$1 [P]
DocumentRoot /var/hda/web-apps/apps-proxy/html
<Directory "/var/hda/web-apps/apps-proxy/html">
Options Indexes FollowSymLinks +ExecCGI
AddHandler fcgid-script .fcg
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/hda/web-apps/apps-proxy/logs/error_log
CustomLog /var/hda/web-apps/apps-proxy/logs/access_log combined env=!dontlog
</VirtualHost>
[root@localhost robert]# service httpd reload
Reloading httpd: [ OK ]
Thanks!
Re: problems with web-apps proxy
Code: Select all
[root@localhost robert]# cat /etc/cron.d/amahi-apps-proxy
* * * * * root /var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
If can help me debug further:
Code: Select all
service crond status
tail /var/log/cron
service crond reload
sleep 70
grep apps-proxy /var/log/cron | tail
- Guillaume Boudreau
Re: problems with web-apps proxy
[root@localhost robert]# service crond status
crond: unrecognized service
[root@localhost robert]# tail /var/log/cron
Jul 9 20:01:01 localhost anacron[4886]: Normal exit (0 jobs run)
Jul 9 20:01:01 localhost run-parts(/etc/cron.hourly)[4875]: starting hda-update
Jul 9 20:02:17 localhost run-parts(/etc/cron.hourly)[4913]: finished hda-update
Jul 9 21:01:01 localhost CROND[5734]: (root) CMD (run-parts /etc/cron.hourly)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting 0anacron
Jul 9 21:01:01 localhost anacron[5745]: Anacron started on 2010-07-09
Jul 9 21:01:01 localhost anacron[5745]: Normal exit (0 jobs run)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5747]: finished 0anacron
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting hda-update
Jul 9 21:01:36 localhost run-parts(/etc/cron.hourly)[5766]: finished hda-update
[root@localhost robert]# service crond reload
crond: unrecognized service
[root@localhost robert]# sleep 70
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
crond: unrecognized service
[root@localhost robert]# tail /var/log/cron
Jul 9 20:01:01 localhost anacron[4886]: Normal exit (0 jobs run)
Jul 9 20:01:01 localhost run-parts(/etc/cron.hourly)[4875]: starting hda-update
Jul 9 20:02:17 localhost run-parts(/etc/cron.hourly)[4913]: finished hda-update
Jul 9 21:01:01 localhost CROND[5734]: (root) CMD (run-parts /etc/cron.hourly)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting 0anacron
Jul 9 21:01:01 localhost anacron[5745]: Anacron started on 2010-07-09
Jul 9 21:01:01 localhost anacron[5745]: Normal exit (0 jobs run)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5747]: finished 0anacron
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting hda-update
Jul 9 21:01:36 localhost run-parts(/etc/cron.hourly)[5766]: finished hda-update
[root@localhost robert]# service crond reload
crond: unrecognized service
[root@localhost robert]# sleep 70
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
Re: problems with web-apps proxy
Wow... no crond! Since July 9th...
Any idea why?
If it's not installed, you should re-install it.
Any idea why?
Code: Select all
rpm -q cronie
Code: Select all
yum -y install cronie
- Guillaume Boudreau
Re: problems with web-apps proxy
No, it was not not installed and no, I have no idea why it wasn't. Would this have been an Amahi auto update or a Fedora update? What would you suggest I check to determine why it wasn't?
Re: problems with web-apps proxy
[root@localhost robert]# service crond status
crond (pid 27631) is running...
[root@localhost robert]# tail /var/log/cron
Jul 9 21:01:01 localhost CROND[5734]: (root) CMD (run-parts /etc/cron.hourly)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting 0anacron
Jul 9 21:01:01 localhost anacron[5745]: Anacron started on 2010-07-09
Jul 9 21:01:01 localhost anacron[5745]: Normal exit (0 jobs run)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5747]: finished 0anacron
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting hda-update
Jul 9 21:01:36 localhost run-parts(/etc/cron.hourly)[5766]: finished hda-update
Jul 24 20:52:03 localhost crond[27631]: (CRON) STARTUP (1.4.3)
Jul 24 20:52:03 localhost crond[27631]: (CRON) INFO (running with inotify support)
Jul 24 20:52:03 localhost CROND[27634]: (root) CMD (/sbin/modprobe cifs && echo 0 > /proc/fs/cifs/OplockEnabled)
[root@localhost robert]# service crond reload
Reloading crond: [ OK ]
[root@localhost robert]# sleep 70
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
Jul 24 20:53:01 localhost CROND[27671]: (root) CMD (/var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php)
[root@localhost robert]#
crond (pid 27631) is running...
[root@localhost robert]# tail /var/log/cron
Jul 9 21:01:01 localhost CROND[5734]: (root) CMD (run-parts /etc/cron.hourly)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting 0anacron
Jul 9 21:01:01 localhost anacron[5745]: Anacron started on 2010-07-09
Jul 9 21:01:01 localhost anacron[5745]: Normal exit (0 jobs run)
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5747]: finished 0anacron
Jul 9 21:01:01 localhost run-parts(/etc/cron.hourly)[5734]: starting hda-update
Jul 9 21:01:36 localhost run-parts(/etc/cron.hourly)[5766]: finished hda-update
Jul 24 20:52:03 localhost crond[27631]: (CRON) STARTUP (1.4.3)
Jul 24 20:52:03 localhost crond[27631]: (CRON) INFO (running with inotify support)
Jul 24 20:52:03 localhost CROND[27634]: (root) CMD (/sbin/modprobe cifs && echo 0 > /proc/fs/cifs/OplockEnabled)
[root@localhost robert]# service crond reload
Reloading crond: [ OK ]
[root@localhost robert]# sleep 70
[root@localhost robert]# grep apps-proxy /var/log/cron | tail
Jul 24 20:53:01 localhost CROND[27671]: (root) CMD (/var/hda/web-apps/apps-proxy/html/refresh_httpd_conf.php)
[root@localhost robert]#
Who is online
Users browsing this forum: No registered users and 16 guests