ServerAdmin webmaster@localhost DocumentRoot /var/www/html/ ServerName 192.168.2.173 ServerAlias demos.voltechgroup.com ProxyPreserveHost On ProxyRequests Off # Correct and consistent mapping ProxyPass /parsing http://127.0.0.1:8081/ ProxyPassReverse /parsing http://127.0.0.1:8081/ AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ServerName office.voltechgroup.com # Enable Rewrite Engine for WebSockets RewriteEngine On RewriteCond %{HTTP:Upgrade} websocket [NC] RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://localhost:8000/$1" [P,L] # Standard Proxy for HTTP ProxyPass / http://localhost:8000/ ProxyPassReverse / http://localhost:8000/ ProxyRequests Off ProxyPreserveHost On Tty3aOAwpsA9kmxtLpAjtafdicFyY349 ServerName office.voltechgroup.com ProxyPreserveHost On ProxyRequests Off # --- Proxy normal HTTP requests to ONLYOFFICE backend --- ProxyPass / http://192.168.3.151:8080/ ProxyPassReverse / http://192.168.3.151:8080/ # --- Proxy WebSocket connections (important for real-time editing) --- ProxyPass /doc/ ws://192.168.3.151:8080/doc/ ProxyPassReverse /doc/ ws://192.168.3.151:8080/doc/ # Optional: increase timeout for large requests ProxyTimeout 600 # Logs ErrorLog ${APACHE_LOG_DIR}/office_error.log CustomLog ${APACHE_LOG_DIR}/office_access.log combined ServerAdmin webmaster@localhost DocumentRoot /var/www/html/ # Set the ServerName and ServerAlias to handle the IP address ServerName 192.168.3.151 # Ensure the directory permissions are correct AllowOverride All Require all granted # Error and access logs ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ServerName demo1.voltechgroup.com ServerAlias 127.0.0.1 192.168.3.151 # Preserve host headers ProxyPreserveHost On ProxyRequests Off # ❌ Exclude Laravel and other apps from proxy ProxyPass /vmclnew ! ProxyPass /vmsc ! ProxyPass /expenseflow ! # 🔵 ONLYOFFICE at root ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ # 🟢 Laravel vmclnew Alias /vmclnew /var/www/html/vmclnew/public AllowOverride All Require all granted # 🟢 Other software vmsc Alias /vmsc /var/www/html/vmsc/public AllowOverride All Require all granted # 🟢 Other software expenseflow Alias /expenseflow /var/www/html/expenseflow/public AllowOverride All Require all granted # Headers for ONLYOFFICE RequestHeader set X-Forwarded-Proto "http" # Logs ErrorLog ${APACHE_LOG_DIR}/onlyoffice_error.log CustomLog ${APACHE_LOG_DIR}/onlyoffice_access.log combined KEY : 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