This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update -y && sudo apt upgrade -y | |
sudo apt install zip unzip certbot python3-certbot-nginx software-properties-common -y | |
# AWS | |
sudo apt install awscli -y | |
# Remove Apache, Install NGINX | |
sudo systemctl stop apache2 && sudo systemctl disable apache2 | |
sudo apt remove apache2 -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format custom '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent $request_time ' | |
'"$http_referer" "$http_user_agent"'; | |
server { | |
listen 80; | |
server_name _; | |
root /var/www/html/public; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
performance_schema = off | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file should be published on | |
# /etc/nginx/modules-available/fastcgi.conf | |
## | |
# FastCGI cache | |
## | |
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=wpcache:200m max_size=10g inactive=2h use_temp_path=off; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; |