Limiting IP access is a rather efficient way to restrict access to sensitive sites, such as for example phpmyadmin installations.There are multiple ways to archive this, one of the easyer ways is by setting the .htaccess file in the web directory for the specific site: The above gives you a series of examples for a […]
Category: Apache
Generic www tot non www redirect for apache
Step 1, Make sure you can use mod_rewrite The virtual host you want to apply the redirection on needs permissions to use mod_rewrite to perform the redirection. You will need something along these lines a little bit dependent on how your websites are configured to enable overriding options through .htaccess Step 2, Applying the redirect […]
Adding apache and php to your bare server configuration
The basic Ubunu server install does not have apache and php installed by default, so you will need to add them to the system. sudo apt install apache2 php php-mysql Verify that your webserver and php are working, by visiting you public ip address. This should display the default apache welcome page. Next, navigate to […]
Adding a named site (virtual hosting) to apache
Each website you configure on your apache server gets it’s own small configuration file, which is a major improvement over the old days where one massive file configured all websites on the server. Navigate to the directory /etc/apache2/sites-available and create a new configuration file for your website. You are free to pick a name for […]