VPS - Server

As a webmaster, you surely need understand about your server (such as install a operating system for server, build a web server, manage your server, optimize server performance and much more. Welcome! You've come to the right place.

How to find any file in Linux

How to find any file in Linux

Usually the webservers or service installed on your server use one management configuration file. Each service has a configuration file with a different path. Sometimes I don’t remember where the configuration files for editing. Fortunately, Linux has a tool to help you easily to find the path of any file. For example, to search for […]

Configure Nginx redirect www to non-www and vice versa

Configure Nginx redirect www to non-www and vice versa

There are many ways to force Nginx using url has www or non-www. I would like to introduce a simple way follows: Redirect non-WWW to WWW Edit nginx configuration file (/etc/nginx/nginx.conf): Single domain server { server_name example.com; return 301 $scheme://www.example.com$request_uri; } All domains server { server_name “~^(?!www\.).*” ; return 301 $scheme://www.$host$request_uri; } From WWW to non-WWW Single […]

Configure Nginx redirect HTTP to HTTPS

Configure Nginx redirect HTTP to HTTPS

Currently the demand of using security protocol SSL for websites are quite popular because Google has increased the importance of ranking for this site. After installing the SSL success, how to redirect all url from HTTP to HTTPS with the nginx, please refer to this tutorial. Edit nginx configuration file (/etc/nginx/nginx.conf). Add or modify the […]