Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was able to use <code>.htaccess</code> files on heroku with the cedar stack.</p> <ol> <li><p><code>Procfile</code> needs to specify a script for the web nodes:</p> <pre><code>web: sh www/conf/web-boot.sh </code></pre></li> <li><p>The <code>conf/web-boot.sh</code> slipstreams the include of a apache configuration file, e.g.:</p></li> <li>A <code>conf/httpd/default.conf</code> then can allow override, as you know it from apache.</li> </ol> <p>You can then just use <code>.htaccess</code> files. The whole process is documented in detail in my blog post <a href="http://hakre.wordpress.com/2012/05/20/php-on-heroku-again/"><strong>PHP on Heroku again</strong></a> of which one part is about the apache configuration. The step in 2. including your own httpd configuration basically is:</p> <pre><code>sed -i 's/Listen 80/Listen '$PORT'/' /app/apache/conf/httpd.conf sed -i 's/^DocumentRoot/# DocumentRoot/' /app/apache/conf/httpd.conf sed -i 's/^ServerLimit 1/ServerLimit 8/' /app/apache/conf/httpd.conf sed -i 's/^MaxClients 1/MaxClients 8/' /app/apache/conf/httpd.conf for var in `env|cut -f1 -d=`; do echo "PassEnv $var" &gt;&gt; /app/apache/conf/httpd.conf; done echo "Include /app/www/conf/httpd/*.conf" &gt;&gt; /app/apache/conf/httpd.conf touch /app/apache/logs/error_log touch /app/apache/logs/access_log tail -F /app/apache/logs/error_log &amp; tail -F /app/apache/logs/access_log &amp; export LD_LIBRARY_PATH=/app/php/ext export PHP_INI_SCAN_DIR=/app/www echo "Launching apache" exec /app/apache/bin/httpd -DNO_DETACH </code></pre> <p>I hope this is helpful. I used this for .htaccess and for changing the webroot.</p>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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