Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to configure Apache to serve static content for CherryPy app. What I am doing wrong?
    primarykey
    data
    text
    <p>I have Apache 2.2.15 configured with Mod_Proxy and Mod_SSL and serving CherryPy web application on RHEL 6.3. The only thing I'm struggling with is getting Apache to serve the website's static content (*.js, *.css, *.jpg). Here is my VirtualHost entry...</p> <pre><code>&lt;VirtualHost mydomain.com:443&gt; ServerAdmin support@mydomain.com ServerName mydomain.com ProxyPreserveHost On SSLProxyEngine On DocumentRoot /var/www/html/mydomain SSLEngine on SSLCertificateKeyFile /etc/ssl/myserver.key SSLCertificateFile /etc/ssl/mydomain_com.crt SSLCertificateChainFile /etc/ssl/mydomain_com.ca-bundle # this prevents the follow URL path from being proxied ProxyPass static/ ! # setup the proxy &lt;Proxy *&gt; Order allow,deny Allow from all &lt;/Proxy&gt; ProxyPass / http://www.mydomain.com:8080/ ProxyPassReverse / http://www.mydomain.com:8080/ &lt;/VirtualHost&gt; </code></pre> <p>For instance the path to my css file is the following...</p> <pre><code>/var/www/html/mydomain/static/style.css </code></pre> <p>Since I'm forcing the entire site to be in https when I navigate to </p> <pre><code>https://www.mydomain.com/static/style.css </code></pre> <p>or</p> <pre><code>http://www.mydomain.com/static/style.css </code></pre> <p>My browser tells me the page is not found (404). Can anyone see what I'm doing wrong?</p> <p>EDIT: it appears that Apache is still proxying /static... I found this redirect when accessing the /static/style.css in my Apache access log...</p> <pre><code>xxx.xxx.xxx.xxx - - [17/Sep/2012:08:46:06 -0400] "GET /static/style.css HTTP/1.1" 301 337 "https://www.mydmain.com/Home/" "Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120826 Firefox/10.0.7" </code></pre> <p>anyone know why that is happening?</p> <p>Thanks in advance!</p> <p>Andrew</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload