Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment of NiceGUI on Shared Hosting (cPanel) #4158

Open
streamcfd opened this issue Dec 31, 2024 · 0 comments
Open

Deployment of NiceGUI on Shared Hosting (cPanel) #4158

streamcfd opened this issue Dec 31, 2024 · 0 comments
Labels
community question A question for the NiceGUI community

Comments

@streamcfd
Copy link

Description

I'm facing issue deploying a nicegui application on shared hosting using cPanel due to hosting restrictions:

Only port 80 is allowed for web applications.
No root access is available to bind directly to port 80.
Other ports like 8080 are blocked by the hosting provider for security reasons.

What I Tried:

  1. .htaccess Redirect for HTTP and WebSocket (WS):

Added .htaccess rules for redirecting HTTP requests to the NiceGUI app.
Result: Only static components load, and dynamic functionalities fail to work.
a2wsgi and FastAPI Integration:

  1. Converted the NiceGUI app to a WSGI application using a2wsgi.

Ran it with FastAPI under the shared hosting environment.
Result: Deployment fails entirely.

Key Restrictions:
The shared hosting allows only WSGI-based apps (e.g., Flask, Django).
Must bind to port 80 through cPanel's configured WSGI environment.

Questions:
Is there a recommended way to adapt NiceGUI to shared hosting environments with WSGI requirements?
Could you provide guidance on bridging WebSocket support in such restricted setups?
Are there any configurations or deployment methods that ensure compatibility with shared hosting?

Environment:
Hosting Panel: cPanel
Server Type: Shared Hosting
Ports: Only 80 allowed; no root access for direct binding
WSGI app only
Any help or suggestions would be greatly appreciated. Thank you!

@rodja rodja added the community question A question for the NiceGUI community label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community question A question for the NiceGUI community
Projects
None yet
Development

No branches or pull requests

2 participants