Notifications
Clear all

Issues related to running web server on non-standard port

4 Posts
2 Users
0 Reactions
903 Views
(@catharsis)
Posts: 9
Active Member
Topic starter
 

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.

 

 

 

 
Posted : 29/05/2021 4:28 pm
(@catharsis)
Posts: 9
Active Member
Topic starter
 

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

 
Posted : 29/05/2021 4:30 pm
(@catharsis)
Posts: 9
Active Member
Topic starter
 

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

 
Posted : 29/05/2021 5:16 pm
TinyWebGallery
(@admin)
Posts: 924
Prominent Member 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

 
Posted : 29/05/2021 9:53 pm