webservers

Everything related to Laptops

Ubuntu Increase Partition Size

After increasing the Disk size from Proxmox, boot the vm from gparted live disk: You will see the unallocated added space. Select the partition you want to add the extra space to, then click on Partition and select Resize/Move.  Here you will be able to simply drag the partition to increment its size. Click Resize/Move… read more »

Ubuntu 20.04 Remove Swap

Disable Swap from the System Check if swap is enabled: sudo swapon –show If enabled, you will see the path to the swap file, if you have a swap file, save file path, to remove it later. To start removing the swap file or partition, start by disabling swap: sudo swapoff -a Remove Swap File… read more »

Fstrim on Ubuntu 18.04

Recently I discovered that my backups of my proxmox virtual machines were taking up too much space on my storage server. After doing some research, i found out that I could run fstrim -v / to remove deleted space from my drive. Now what I needed was a way to automated it. Using Cron I… read more »

WordPress Visitors Same Ip

Today I was able to fix a issue that was happening on one of my WordPress websites. Basically the comments that were being left by users were being recognized by WordPress as comming from the same Ip Address. This Ip address was the address of the nginx proxy. What I had to do to fix… read more »

.htaccess RewriteRule Examples

Here are some examples of rewriteRules that i found online, I am always looking for this, so I decided to save them here. Thanks to brontobytes for the examples. Example 1 Original URL:http://www.domain.com/product.php?id=15 Rewritten URL:http://www.domain.com/15.php Rule for .htaccess:RewriteEngine OnRewriteRule ^([^/]*)\.php$ /product.php?id=$1 [L] Example 2 Original URL:http://www.domain.com/product.php?id=15 Rewritten URL:http://www.domain.com/product15.php Rule for .htaccess:RewriteEngine OnRewriteRule ^product([^/]*)\.php$ /product.php?id=$1 [L]… read more »

Restya Board Docker

After I had ran the docker-compose up -d command, I was presented with the restya board login. After setting up everything (users, boards, change default passwords) I was not getting notifications through email, I checked and the postfix service was not working correctly. Here is what I did to fix it, I went and removed… read more »

Nextcloud 18.0.1 with Docker-compose

Today I got my nextcloud server running with docker compose. Here is a run down of what I had to figure out: I had to chose how to install it, went with what is in the github repo: https://github.com/nextcloud/docker.git I chose the with-nginx-proxy with apache: https://github.com/nextcloud/docker/tree/master/.examples/docker-compose/with-nginx-proxy/mariadb/apache. The nginx proxy is a must if you are… read more »

Permission denied (publickey) FreeNas

Today I was able to solve this one problem that was driving me nuts for the past 3 days. Connecting to freenas with ssh using ssh keys. I am trying to setup a backup system, where a web server can backup to freenas through the network. For some reason ssh was not able to login… read more »

Configure Server to return the Cache-Control response

This setting tells the browser how long to keep a copy of the website and use it, instead of getting it from the server. This will reduce the website load time, and makes for a better user experience. Options that come with Cache-Control:no-cache: tells the browser to check if the resource has changed, if so… read more »

Sidebar