Notifications
Clear all

Issues related to running web server on non-standard port

(@catharsis)
Active Member

For personal reasons I am running my site on port 8181 but still using HTTPS

I think some of the problems I've been having are because many of the internal links generated by the software do not accommodate this.

Some of the damage is mitigated because I currently have the web server also listening on port 443 to redirect requests back to port 8181, however I might want to remove this at some point.

In the logs I'm seeing large numbers of requests in my port 443 log, here's a small sample  (attached screenshot), all of these had to be redirected back to port 8181.

Also Firefox blocks some of these requests due to cross-origin policy, because the when the page on 8181 makes a request to port 443 it's seen as a different origin.

Here's an example of what I see in the console:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at  https://(mydomain).org/testgallery/?twg_highbandwidth=true&twg_session=true.  (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at  https://(mydomain).org/testgallery/?twg_highbandwidth=true&twg_session=true.  (Reason: CORS request did not succeed).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at  https://(mydomain).org/testgallery/?twg_highbandwidth=true&twg_session=true.  (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at  https://(mydomain).org/testgallery/?twg_highbandwidth=true&twg_session=true.  (Reason: CORS request did not succeed).

I could set a Access-Control-Allow-Origin header on my 443 server but I'd really prefer not to and again I'd like to completely unbind port 443 at some point.

 

 

 

Quote
Topic starter Posted : 29/05/2021 5:28 pm
(@catharsis)
Active Member

Screenshot of my gallery running on port 8181 making requests to port 443 which Firefox consequently blocks

ReplyQuote
Topic starter Posted : 29/05/2021 5:30 pm
(@catharsis)
Active Member

Screenshot of the network tab in inspector showing that some requests are being sent to port 443 instead of 8181

ReplyQuote
Topic starter Posted : 29/05/2021 6:16 pm
TinyWebGallery
(@admin)
Administrator Admin

It seems that the speedtest is not using a port.

can you set $test_client_connection=false;

And let me know...

Best regards, 

Michael

ReplyQuote
Posted : 29/05/2021 10:53 pm