NGINX Protect Domain through Password It’s very easy to place a simple htpasswd-based authentication system on a domain served by nginx. To do this, you’ll want your server block to look like this: server { listen 80; server_name domain.com; root /site/root; index index.html index.htm; auth_basic …
NGINX and APACHE URL Redirects
NGINX APACHE URL Redirects Redirect all the requests to https server { listen 80; server_name i90runner.com; rewrite ^ https://$server_name$request_uri? permanent; } Redirect Specific Pages rewrite /humor /humor/humor.php; rewrite /events/search /Events/events_search.php; rewrite /events/summary /Events/events_summary.php; rewrite /photos /photos/index.php; rewrite /help /Technology/blog.php?ID=344; rewrite /hikes /Technology/blog.php?ID=386; Redirect based on …
MySQL and phpMyAdmin Setup
MySQL and phpMyAdmin Setup sudo yum install mysql sudo yum install mysql-server sudo yum install mysql-devel sudo chgrp -R mysql /var/lib/mysql sudo chmod -R 770 /var/lib/mysql sudo service mysqld start sudo yum install phpmyadmin Errors: # tail -f error.log 2014/03/06 20:11:05 [error] 2833#0: *1 directory …
Setup EC2 Instance with NGINX and PHP-FPM
Setup EC2 Instance with NGINX and PHP-FPM Login into AWS Console and launch default Amazon Instance. Security Group: Create your security group and download your key. Restrict the permissions on your key. sudo chmod 400 Kaizen.pem SSH into your Machine: ssh -i Kaizen.pem [email protected] Update …
NGINX – SSL Certificate Setup
Create the Server Key and Certificate Signing Request Start off by creating the 1024 rsa private key. sudo openssl genrsa -des3 -out /etc/nginx/conf.d/i90runner.key 1024 sudo openssl req -new -key /etc/nginx/conf.d/i90runner.key -out /etc/nginx/conf.d/i90runner.csr Remove the Passphrase sudo cp /etc/nginx/conf.d/i90runner.key /etc/nginx/conf.d/i90runner.key.org sudo openssl rsa -in /etc/nginx/conf.d/i90runner.key.org -out …