If I have a directory structure such as:
/ /libraries/ /other-nonpublic-stuff/ /webroot/
How can I set /webroot/ as document_root so that only content is served under the URL of my hero?
I think Procfile may be a way to achieve this, but it is not documented. Already tried things like
web: php webroot/
or
web: sh boot.sh webroot/
or
web: sh webroot/
in Procfile , but I always only got Heroku push rejected, no Cedar-supported app detected
When I click the repo with "index.php" in the root directory, it works fine, and heroku ps just shows one web process running "boot.sh" on, but even then Procfile is explicitly ignored and the hero is served with "/" instead "/ webroot". So there isnβt quite a hint of how I can configure my Procfile :
Process State Command ------- --------- ---------- web.1 up for 2h sh boot.sh
I went into the console of my "instance" via heroku run bash and made cat boot.sh It contains the following:
sed -i 's/Listen 80/Listen '$PORT'/' /app/apache/conf/httpd.conf for var in `env|cut -f1 -d=`; do echo "PassEnv $var" >> /app/apache/conf/httpd.conf; done touch /app/apache/logs/error_log touch /app/apache/logs/access_log tail -F /app/apache/logs/error_log & tail -F /app/apache/logs/access_log & export LD_LIBRARY_PATH=/app/php/ext export PHP_INI_SCAN_DIR=/app/www echo "Launching apache" exec /app/apache/bin/httpd -DNO_DETACH
Thus, the problem with the Heroku push rejected, no Cedar-supported app detected error Heroku push rejected, no Cedar-supported app detected (when there is no .php file in "/" is obviously resolvable by changing PHP_INI_SCAN_DIR to "/ app / www / webroot", but this is a) impossible and b ) will not solve the problem of using "/ webroot" as a docroot. To fix this, I also had to change "/app/apache/conf/httpd.conf".
Any suggestions?:)
Thanks Josh
source share