[MMO] Live Threads

[MMO] Live Threads 2.3.9

No permission to download
On .htaccess maybe, I'm not sure.
ChatGPT conversion from my nginx configuration.

Apache config:
# Enable necessary modules
# Ensure the following modules are enabled in your Apache setup:
# - mod_proxy
# - mod_proxy_http
# - mod_proxy_wstunnel
# - mod_headers

# Define the WebSocket proxy
<VirtualHost *:80>
    ServerName your-domain.com

    # WebSocket proxy configuration
    <Location /connection/websocket>
        ProxyPass ws://127.0.0.1:8000/connection/websocket
        ProxyPassReverse ws://127.0.0.1:8000/connection/websocket

        # Set WebSocket headers
        RequestHeader set Host %{HTTP_HOST}s
        RequestHeader set X-Forwarded-Host %{HTTP_HOST}s
        RequestHeader set X-Forwarded-Proto %{REQUEST_SCHEME}s
        RequestHeader set X-Scheme %{REQUEST_SCHEME}s
        RequestHeader set X-Real-IP %{REMOTE_ADDR}s
        RequestHeader set X-Forwarded-Port %{SERVER_PORT}s

        # Handle connection upgrade for WebSocket
        RequestHeader set Upgrade %{HTTP_UPGRADE}s
        RequestHeader set Connection "upgrade"
    </Location>

    # Generic HTTP proxy settings (used for non-WebSocket traffic)
    ProxyPass / http://127.0.0.1:8000/
    ProxyPassReverse / http://127.0.0.1:8000/

    # Proxy timeout settings
    ProxyTimeout 300
    ProxySendTimeout 300
    ProxyReceiveTimeout 300
    Timeout 300

    # Buffering settings (Apache does not support NGINX-style buffering control)
    # These are typically handled by the backend application or left at defaults
</VirtualHost>
 
my .htaccess

Code:
    # Proxy other HTTP requests
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

<IfModule mod_rewrite.c>
    
    RewriteEngine On
    
        
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /(.*) wss://localhost:3000/$1 [P,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]



</IfModule>
 
@Rangers Fans much easier is to host Centrifugo on a remote server; just use nginx in front of it and a sub-domain.
That is what I'm doing now.

$5 or $6 per month in VPS should be enough.

Non-peak hour stats
1738219302151.webp
 
my .htaccess
I did not write configs for Apache and do not work and have not worked with it. Contact the system administrator or those who provide services for its configuration. Purely in theory, what @rdn suggested to you is correct. But how it actually works I do not know and why it does not work, but judging by the documentation it seems to be true.
besides, as he wrote, the most important script is Apache and I don’t know how to make it work from .htaccess, also check the modules he described to make sure they are enabled.
@Rangers Fans much easier is to host Centrifugo on a remote server; just use nginx in front of it and a sub-domain.
This is the simplest option, to move it to an external server.
 
  • Like
Reactions: rdn
Back
Top Bottom