Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
1.3k views
by Rookie

Hello!

I have a local web server listening on port 80

can i make a nginx redirect to it using ssl?

like

sudo site example.com -proxy=[localhost:80] -ssl
by Rookie
reshown by
I asked something wrong?
by Talented
The standard for SSL is port 443 so I doubt you'll have much luck with that.
by Expert

Nothing wrong, it's just better if you just try it before asking. Share your effort!

And yes, you can use the "reverse proxy" site configuration for that purpose, just read the docs and try it!

by Talented
You make a good point.
by Rookie

there is no solution to my problem and no one began to help me

so i tried it myself

1. create empty site

site mysite.com -html

2. add ssl

site mysite.com -ssl=on

3. delete site, but dont delete ssl cert

site mysite.com -delete
Revoke SSL Cert [Y/n]? 

answer No

4. add reverse proxy

site mysite.com -proxy=[192.168.7.102:80]

5. add ssl fo reverse proxy site

mkdir /opt/mysite.com
site mysite.com -ssl=on -root-path=/opt/mysite.com
by Talented
I see you've doine things a little differently, and in a different order, which just goes to show, you don't know what you don't know... until some kind soul points it out to you!

Thank you Diki, I think you might have broken the log jam.
by Expert
That makes no sense and it will be broken in a couple of months when the cert will try to auto-renew and it will be misconfigured!

Please, read the docs about how to create a cert for reverse proxy sites with custom root paths. You don't need to create an "empty" site!
by Rookie
I regret nothing =)
by Rookie
It may break, but it's a problem for me from the future

I tried to search for information on webinoly documentation site and found only examples for local sites
by Rookie

Create a website with a Reverse Proxy configuration in Nginx

sudo site example.com -proxy=[localhost:3001]

Go to the path /etc/nginx/sites-available/and edit the file example.com. Find and comment on the line includeas below

	# WebinolyCustom
	# include apps.d/example.com-proxy.conf;
	# WebinolyCustomEnd

Restart nginx

nginx -t && nginx -s reload

Create a directory for ssl authentication , which can be deleted after the ssl has been created

mkdir /var/www/example.com/htdocs

Create SSL

sudo site example.com -ssl=on

Now go to the path again /etc/nginx/sites-available/and edit the file example.com. Currently this file has the ssl configuration added. Now we change the line includeback to the original:

# WebinolyCustom
include apps.d/example.com-proxy.conf;
# WebinolyCustomEnd

Restart nginx

nginx -t && nginx -s reload
by Expert

Guys, this is a professional forum and you will be banned from here if you insist on writing and recommending these non-sense things. If you think you found a bug or you have a recommendation, please do it in a professional way including all the details.

Low-effort questions are not welcome here!

There's a section in the docs titled "Certificates for Reverse Proxy sites", and also you can find a practical example in the advanced tutorial that is recommended in our docs.

 Please, I think it's not that hard to follow these simple instructions.

Please log in or register to answer this question.

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...