The most awaited tutorial is here: Learn Installing LEMP

#1

https://gulshankumar.net/install-wordpress-with-lemp-on-ubuntu-18-04/

7 Likes

#9

cc: @Pramod @Paritosh @Adarsh_Sahu @Rohan_Kumar @pankaj

7 Likes

#14

What do you think of this? https://www.digitalocean.com/products/one-click-apps/lemp/

0 Likes

#15

Thanks for creating such helpful tutorial. But it will not support htaccess right? I have many codes in the htaccess file, how to convert them for nginx config file?

0 Likes

#16

No, it won’t support .htaccess file since it is NGINX. But no worries, you can try Redirection plugin.

  1. Add rules
  2. Go to its settings > export in Nginx config

Shortcut. :grinning:

1 Like

#17

OK thanks.

0 Likes

#18

Got another solution:
https://winginx.com/en/htaccess

0 Likes

#19

Yes, that’s an option.

Also …
http://www.anilcetin.com

You’re welcome!

1 Like

#20

htaccess codes:

# For below redirect rules which do not contains /blog/ in the path
RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ https://www.example.com/$3

# For blog directory
RedirectMatch 301 ^/blog\/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ https://www.example.com/$3

# Remove .html from URL Start
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^(.*)\.html$ /$1/ [R=301,L]
# Remove .html from URL End

Tool converted to Nginx:

# nginx configuration

location ~ ^/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ {
  rewrite ^(.*)$ https://www.example.com/$3 redirect;
}

location ~ ^/blog\/([0-9]{4})/([0-9]{2})/(?!page/)(.+)$ {
  rewrite ^(.*)$ https://www.example.com/$3 redirect;
}

location / {
  if ($request_uri ~ "\.html$"){
    rewrite ^/(.*)\.html$ /$1/ redirect;
  }
}

Is the tool converted correctly?

This doesn’t work, also giving popup redirection.

0 Likes

#21

It appears correctly.

1 Like

#22

image

This reboot is actually optional/Not needed

1 Like

#23

Yes… True

1 Like

#24

how to Migrate a Wordpress to a LEMP? @GulshanKumar

0 Likes

#25

Assuming, you want to migrate an existing WordPress to LEMP Stack. Please check below topics for answers.

As earlier replied for topic Website migration from shared to cloud.

1 Like

#29

How to enable HTTP/2 on all available sites on the server?

1 Like

#30

step 9 not clear

0 Likes

#31

Please refer to the example image to understand step 9, how to update DNS records.

0 Likes

#32

You can enable HTTP/2 by changing default port to 443 in each config file. See how https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-with-http-2-support-on-ubuntu-16-04

0 Likes

#33

If I enter any rule in /etc/nginx/sites-available/default, will it apply to all of the server blocks?

0 Likes

#34

not using cloudflare

0 Likes