server_configuration:apache

This is an old revision of the document!


So many problems with cache in browsers.

Good to test with a browser which can have all data cleared, and do work in private browsing.

Using wget to test the apache configuration, see some extra samples and docs over at Computer Hope - Linux wget command.

# Run a command to get the default page, and view the http redirects as returned by the server
wget --verbose datablog.roman-halliday.com
 
# Reload apache configuration
sudo service apache2 reload

https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04 - https://help.servmask.com/2018/10/27/how-to-increase-maximum-upload-file-size-in-wordpress/

  1. Move apache base location

SSL - Let's Encrypt

How To Secure Apache with Let's Encrypt on Ubuntu 20.04 - https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-20-04

certbot --apache
systemctl reload apache2
service ssh reload
# All configuration files
/etc/apache2/sites-available/

# Enabled sites
/etc/apache2/sites-enabled/

Make sure all files are owned correctly:

# Site content owned by www-data so webserver can modify files
chown -R ../ www-data:www-data /var/www
 
# Configuration owned by root
chown -R ../ root:root /etc/apache2

Note: If no site is “enabled” then a default entry seems to run hosting files under: /var/www/html

Hosting can be tested with the file:

index.php
<?php
// For backup, rename this for easy reference: php_info.php
phpinfo();
?>

Bug: extra index

I had an extra index.html file from before. The old server prioritised php pages over php. This one the other way around. It took time to realise the reason I was not getting one of the wiki pages working was because of the extra index.html'' file.

<head>
        <title>Romanian - Roman-Halliday.com</title>
</head>
<body>
        <h1>Romanian</h1>
        <p>wiki will be here</p>
</body>
  • server_configuration/apache.1610557328.txt.gz
  • Last modified: 2021/01/13 17:02
  • by david