Magento 1.9 Nginx Configuration

Here is Nginx + php-fpm config for Magento 1.9 on Ubuntu 16.04/Debian 9. server { listen 80; server_name mysite.com www.mysite.com; root /home/mysite.com/public_html/; listen 443 ssl http2; ssl on; ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain1.pem; ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey1.pem; location / { index index.html index.php; try_files $uri $uri/ @handler; expires 30d; } ## These locations would be hidden by .htaccess normally location … Read more

Nginx configuration for aMember

Here is Nginx configuration for aMember script location ~* ^/amember/.*\.(js|ico|gif|jpg|png|css|swf|csv)$ {} location ~* ^/amember/setup/index.php$ { try_files not-existing-file @php; } location ~* ^/amember/js.php { try_files not-existing-file @php; } location ~* ^/amember/index.php$ { try_files not-existing-file @php; } location ~* ^/amember/public.php$ { try_files not-existing-file @php; } location ~* ^/amember/public { rewrite ^.*$ /amember/public.php; } location ~* ^/amember/setup { … Read more

Nginx Redirect

Redirect www domain to non-www If you use custom ports, use Redirect Naked Domain to www Redirect a site to HTTPS Here is a config with HTTP SSL verification Another way to redirect to HTTPS is by using To redirect a specific URL to another URL If you want to redirect a URL that matches … Read more

Nginx

Nginx is a powerful open source web server that is known for its high performance, stability, and flexibility. It is used by millions of websites around the world, and it is a popular choice for web developers and system administrators who need a reliable and efficient way to serve web content. Install Nginx Nginx Tricks … Read more

Nginx SSL Configuration

Let’s say we have an Nginx virtual host like following To make it SSL enabled, add the following to the server entry. ssl_client_certificate introduced in Nginx version 1.19.4. If you are using an older version, add your ca-bundle after SSL certificate. Example SSL protocols dhparam Create In your nginx config, add Redirect Traffic to SSL … Read more

Nginx WordPress

Here is nginx configuration for wordpress server { listen 80; server_name serverok.in www.serverok.in; root /var/www/html; index index.php; client_max_body_size 100M; location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include snippets/fastcgi-php.conf; proxy_read_timeout 180; … Read more

Nginx Configuration for phpMyAdmin

On Debian 9 server with nginx, i installed phpmyadmin with apt install phpmyadmin For some reason, ip-address/phpmyadmin did not work. On Ubuntu, it normally ask for for web server you have installed, then configure it during install. I got this working by adding following code location /phpmyadmin { root /usr/share/; location ~ ^/phpmyadmin/(.*\.php)$ { include … Read more

vShare Nginx Config

Here is Nginx Configuration for vShare youtube clone script # enforce NO www if ($host ~* ^www\.(.*)) { set $host_without_www $1; rewrite ^/(.*)$ https://$host_without_www/$1 permanent; } # main server location / { ## RewriteRule ^include/(.*) http://www.vshare.in rewrite ^/admin(.*)$ /index.php permanent; rewrite ^/admin/(.*)$ /index.php permanent; rewrite ^/install(.*)$ /index.php permanent; rewrite ^/install/(.*)$ /index.php permanent; rewrite ^/ubr(.*)$ /index.php … Read more