Reputation: 5432
I want to run a php file with Heroku Scheduler. What are some methods to ensure that not just anyone can come along and execute the file? Is there a way to put stuff above the web root ('www' with a php app)?
Upvotes: 0
Views: 151
Reputation: 429
The easiest way to accomplish this is to use a .htaccess
file in your project's root directory to ensure that these files are not accessible through Apache. Scheduler will still be able to execute them.
<Directory /app/www/DIRECTORY_NAME>
Order Deny,Allow
Deny from All
</Directory>
With DIRECTORY_NAME
being the name you've put these PHP files in.
Upvotes: 1