Tag: Apache

Why is Apache ignoring my .htaccess file?

You will find that .htaccess will be ignored by default in Apache. We can enable it by altering the configuration file. Firstly, backup the configuration file. sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf.bak Open the config file. sudo nano /etc/apache2/apache2.conf Scroll down the the following section. /etc/apache2/apache2.con <Directory /var/www/> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory>…

Continue reading Why is Apache ignoring my .htaccess file?

PHP / Apache: Set Max File Upload and Post Size

The default PHP max file upload and post value is actually quite small (around 2 MB) for security reasons. In this guide we will increase the max value using php.ini.

1. Locate php.ini Firstly, you need to locate your php.ini file. In this example, our php.ini is located in /etc/php/7.2/apache2/php.ini, however, this may be different for you depending on your PHP version. If you are unsure, please read: Where is my PHP php.ini Configuration File Located? 2. Edit php.ini Open your php.ini file with nano. sudo nano…

Continue reading PHP / Apache: Set Max File Upload and Post Size

Where are the Apache Error and Access Logs Located?

To view the Apache error log and access log files, we can use tail to display the last 200 entries. sudo tail /var/log/apache2/error.log -n 200 sudo tail /var/log/apache2/access.log -n 200 To output appended data as the logs grows, use -f. sudo tail /var/log/apache2/error.log -f sudo tail /var/log/apache2/access.log -f

Continue reading Where are the Apache Error and Access Logs Located?