: Apache Unable to open logs: /Applications/MAMP/Library/${APACHE_LOG_DIR}/error.log I am trying to run a project built in Ubuntu with PHP on fat-free framework. I am using MAMP on macOS Yosemite
I am trying to run a project built in Ubuntu with PHP on fat-free framework. I am using MAMP on macOS Yosemite 10.10.1.
I imported a database successfully through phpmyadmin & following these instructions. My httpd-vhosts.conf file looks like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot "/Applications/MAMP/htdocs"
<Directory "/Applications/MAMP/htdocs>
Options -Indexes FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
The project files are located at the "htdocs" web root folder in /Applications/MAMP/htdocs. Note that when I am trying to run it in this form the Apache server throws error, it does not run. When I comment the ErrorLog section the Apache server runs properly but all I get is a blank page.
The error message in the apache_error.log is:
No such file or directory: httpd: could not open error log file /Applications/MAMP/Library/${APACHE_LOG_DIR}/error.log. Unable to open logs
More posts by @Jamie184
1 Comments
Sorted by latest first Latest Oldest Best
It appears that your APACHE_LOG_DIR variable is not defined.
See this thread. It says that you need to define it in /etc/apache2/envvars. I'm not sure exactly where then envvars file would be on a Mac, but it should be with all the other apache2 configuration files.
Alternately, you should just use a hardcoded path rather than ${APACHE_LOG_DIR}. For example:
ErrorLog /Applications/MAMP/logs/error.log
CustomLog /Applications/MAMP/logs/access.log combined
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.