-
Notifications
You must be signed in to change notification settings - Fork 89
HTTP -> HTTPS redirect in admin panel won't work #104
Comments
I don't understand, do you have a question or is this an instruction? The reason you/we use 9098 or a different port because we want to be safe with generic known Vesta security issue scans; but yes, it will create this issue. I rather have this problem than exposing myself to Vesta 0-days security issue; and yes, we've had several incidents like this in the past. See Vesta forum. Though I don't have an issue because I use different port and no report with any users running this docker. If you are providing instruction, I'd like to note that there are many other ways to work-around the issue, such as proxy-pass it from some port (9098) to Vesta 8083. I'm guessing you're asking why 8083 doesn't work? This is because Vesta run it's own nginx server, yes there are two nginx servers running and one is specific to Vesta, you can see the configuration here If you want to change or proxy vesta port, you need to look at/update that configuration. It's not very flexible, which make it difficult to change Vesta port. Some kind of a task may have to be setup to update this nginx.conf file on a regular basis to make sure it doesn't get override by update or a new installation. |
It was both a bugreport and a question if my solution bad or good. |
I'd like to point out two possible quirks with your setup so you can troubleshoot if running into these issues in the future:
This is why I just live with the original issue of bad port redirect but I have a bookmark so I don't run into bad port redirect. The better solution I'm suggesting is:
Setup startup script and cron daily for this. |
Due to 9098->8083 mapping Nginx can't redirect properly from HTTP to HTTPS admin panel.
It use instruction
error_page 497 https://$host:$server_port$request_uri;
in./vesta/local/vesta/nginx/conf/nginx.conf
But$server_port
will always 8033 in spite of any port mappings.Finally I've switch mapping to 8083->8083 but create fake subdomain vestacp.mygreatsite.com and strict access to admin panel only by using the name
vestacp.mygreatsite.com:8083
. (I've add approapriate record in myhost
file for this way.) All other domains on port 8083 will drop to default server for this port and will recieve 400 error page.The text was updated successfully, but these errors were encountered: