miroslavpejic85 / mirotalk

🚀 WebRTC - P2P - Simple, Secure, Fast Real-Time Video Conferences Up to 4k and 60fps, compatible with all browsers and platforms.
https://p2p.mirotalk.com
GNU Affero General Public License v3.0
2.6k stars 502 forks source link

set htaccess #222

Closed majidjamhsidi closed 2 months ago

majidjamhsidi commented 2 months ago

Hello, I installed mirotalk on centos 7 server and I got help from pm2 to install it. Currently, when I type the following commands in the .htaccess file, I encounter an error:

RewriteEngine On

Redirect HTTP to HTTPS

RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Serve static files directly (if needed)

Replace '/public' with the directory where your static files are located

RewriteCond %{REQUEST_URI} !^/public RewriteRule ^(.*)$ public/$1 [L]

Proxy requests to Express.js application

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ http://localhost:3000/$1 [P]

And when I remove $1 from the end of the last line of code:

RewriteRule ^(.*)$ http://localhost:3000/ [P]

, I see the landing site page, but it does not move to other pages. What should I do to fix this problem and what is the correct htaccess?

miroslavpejic85 commented 2 months ago

Please join with us on discord forum for questions. Regarding the Apache configuration for self-hosting Mirotalk P2P, you can follow the documentation: Mirotalk P2P Self-Hosting.