The following procedure must be ran on an elevated cygwin terminal.
cygrunsrv --remove nginx
Extremely Serious
The following procedure must be ran on an elevated cygwin terminal.
cygrunsrv --remove nginx
The following procedure must be ran on an elevated cygwin terminal.
1. Run the following command and accept the defaults.
cygserver-config
2. Register the nginx as a service with the following command:
cygrunsrv --install nginx --path /usr/sbin/nginx.exe --disp "CYGWIN nginx" --termsig QUIT --shutdown --dep cygserver







Since Raspbian and Ubuntu are both based on Debian we can use the the same procedure and validation from here.
Nginx is a lightweight HTTP server, reverse proxy and email proxy server.
sudo apt-get install nginx
On the terminal run the following command:
curl http://localhost
If the installation was successful you will see something similar to the following output:

If the output is not similar to the output above, most probably that the Nginx was not started after the installation. To start it, use the following command and repeat the curl command:
sudo service nginx start
Sometimes we wanted our personal service to be hosted in our own network at home and we wanted it to be accessible via internet. However, our ISP doesn't provided us with a static IP. Thus our public IP could be anything for some moment. Knowing this different IP's is not ideal and tedious. This is where a service like NoIP comes in where it gives a more easy to remember hostname that is attached to your current public IP. But keeping it updated is still a tedious thing to do. This is where we can use Raspberry Pi to do this task for us.

tar -zxf noip-duc-linux.tar.gz
The extract is a directory similar to the following format:
noip-<version>
sudo make sudo make install

cd /etc/init.d
sudo vi noip2
#! /bin/sh
#. /etc/rc.d/init.d/functions # uncomment/modify for your killproc
case "$1" in
start)
echo "Starting noip2."
sleep 10
/usr/local/bin/noip2
;;
stop)
echo -n "Shutting down noip2."
killproc -TERM /usr/local/bin/noip2
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
exit 0
sudo chmod 755 noip2
cd /etc/rc3.d
sudo ln -s ../init.d/noip2 S05noip2
After completing the procedure above, do the following:
Have you experience something that when you access a website it will always try to use the HTTPS scheme. This can happen because of the following reason:
The server requests a redirect to an https scheme.
Or
The browser receives an Strict-Transport-Security (STS) header .
In our case, I am talking about the second one. With the advent of Let's Encrypt CA, everybody now can have a free SSL certificate if we like that normally lasts for 3-months. To make it longer than that, just use or create a script that will do the automatic renewal of our certificate.
The server can tell the browser to always use HTTPS for a period of time using HSTS.
HTTP Strict Transport Security (HSTS) is a web security policy mechanism which helps to protect websites against protocol downgrade attacks and cookie hijacking. - https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security
We can observe HSTS in action using chrome via the developer tools. If you access a website via HTTP and we can notice from the picture at the bottom that there's an internal redirect going-on (i.e. 307 Internal Redirect). This is not a redirect request coming from the server but from the browser itself. Another clue is the existence of Non-Authoritative-Reason : HSTS header.
The Upgrade-Insecure-Request header is telling the server that we prefer the secured content to be served. Thus if our websites contains a mixture of HTTP and HTTPS artifacts (e.g. CSS, Javascript), everything will be served as HTTPS.
Related Post
CLEARING DOMAIN HSTS IN CHROME
Sometimes it is useful to get the output of a command and paste it to a text editor. For this we can use piping and the clip (i.e. sends the output to Windows clipboard) command.
Example:
If we go to any directory and run the tree command but it returns a very long output that exceeds the screen. We can redirect the output to Windows clipboard temporarily then paste it to a text editor.
%USERPROFILE%>tree
Where %USERPROFILE% is normally resolves to our local home directory.
The output might not fit to command terminal screen.
%USERPROFILE%>tree | clip
You will see no output because it is directed to a Windows clipboard.
Check if you can confirm the last entries from step 2 exists to our pasted output.
| Field | Value |
|---|---|
| WordPress Address (URL) | https://<valid-url>/apps/wordpress |
| Site Address (URL) | https://<valid-url>/apps/wordpress |
| Field | Value |
|---|---|
| Fix insecure content | Capture All |
| HTTPS detection | unable to detect HTTPS |
© 2025 Ron and Ella Wiki Page
Theme by Anders Noren — Up ↑
Recent Comments