Hi

I played around wirh mod_proxy and mod_ proxy_html. Another issue was a 
missing controller (only with revers proxy) "default/index.load". I added 
this controller manually, now it's running.

Usable configuration for Apache 2.4:

<VirtualHost *:80>
    ServerName raffael.myserver.ch
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}/Starprime
</VirtualHost>

<VirtualHost *:443>
    ServerAdmin webmas...@myserver.ch
    ServerName raffael.myserver.ch

    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/server.crt
    SSLCertificateKeyFile /etc/apache2/ssl/server.key

#    LogLevel warn proxy_html:trace3
    ProxyHTMLEnable On
    SetOutputFilter proxy-html
    ProxyHTMLLinks img    src
    ProxyHTMLURLMap http://192.168.90.101:8000

<Location "/Starprime">
    Require all granted
    ProxyPass http://192.168.90.101:8000/Starprime
    ProxyPassReverse http://192.168.90.101:8000/Starprime
#    ProxyHTMLURLMap / /Starprime/
#    ProxyHTMLURLMap /Starprime /Starprime
</Location>

    LogFormat "%h %l %u %t %r %>s %b" common
    CustomLog /var/log/apache2/raffael-access.log common
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Regards,
Daniel

On Friday, November 28, 2014 9:34:00 AM UTC+1, Daniel Vogel wrote:
>
> Hi
>
> I use the built-in web2py Wiki. It works create without mod_proxy 
> configuration. If I use mod_proxy with Apache I get wrong URL for the 
> uploaded media files (png graphics etc.).
>
> My Apache virtual host file:
> <VirtualHost *:80>
>     ServerAdmin webmas...@myserver.ch
>     ServerName raffael.myserver.ch
>
> <Location "/Starprime">
> #    SSLRequireSSL
>     Require all granted
>     ProxyPass http://192.168.90.101:8000/Starprime
>     ProxyPassReverse http://192.168.90.101:8000/
>     ProxyHTMLURLMap http://192.168.90.101/Starprime/ /Starprime
> </Location>
>
> </VirtualHost>
>
> <VirtualHost *:443>
>     SSLEngine On
>     SSLCertificateFile /etc/apache2/ssl/server.crt
>     SSLCertificateKeyFile /etc/apache2/ssl/server.key
>  <Location "/">
>     Require all granted
>     ProxyPass http://192.168.90.101:8000/
>     ProxyPassReverse http://192.168.90.101:8000/
> </Location>
>     LogFormat "%h %l %u %t %r %>s %b" common
>     CustomLog /var/log/apache2/raffael-access.log common
> </VirtualHost>
>
> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
>
> Wrong URL:
> https://raffael.myserver.ch/Starprime/static/images/favicon.ico
> https://raffael.myserver.ch/Starprime/static/images/favicon.png
> https://raffael.myvogel.ch/Starprime/static/images/glyphicons-halflings.png
> *http://192.168.90.101:8000/Starprime/default/index/12/test.png 
> <http://192.168.90.101:8000/Starprime/default/index/12/test.png> --> this 
> is my internal IP from the web2py service*
> https://raffael.myserver.ch/Starprime/static/images/twitter.png
> https://raffael.myserver/Starprime/static/images/facebook.png
> https://raffael.myserver.ch/Starprime/static/images/gplus-32.png
>
> The URL test.png is the problem. Not possible to reach from outside with 
> this IP and no https.
>
> If I use the Wiki locally, *Edit Page" adjust the *Media" link with each 
> "Submit". I tried with different URL's locally. For example, I changed from 
> 127.0.0.1 to localhost. After "Submit" from the "Edit Page" the Media URL 
> was adjusted from 127.0.0.1 to localhost. But this is not working if I use 
> web2py behind reverse proxy.
>
> Any idea to help?
>
> Thank you
>
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to