nginx does not read .htaccess. One location block in your site’s configuration sends every address of the chat’s path to its front controller.
Add this to the server block of your site, with your own PHP-FPM socket:
location ^~ /opensolr-chat/ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/opensolr-chat/index.php;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_buffering off;
gzip off;
}^~ /opensolr-chat/takes every address under the path before any otherlocationof your site can.SCRIPT_FILENAMEpoints at the front controller you copied in step 3 of Installing.fastcgi_buffering offandgzip offlet the answers reach the browser word by word.
If you mounted the chat on another path, use that path here and in base_path.
sudo nginx -t && sudo systemctl reload nginx
Then https://your-site/opensolr-chat/widget.js must open as JavaScript.
When nginx is a reverse proxy in front of another web server, the settings are on Behind a proxy; more on buffering on Streaming through your server.
Install on your server
- Installing
- Mounting on Apache
- Mounting on nginx
- Behind a proxy
- Streaming