'how to i replicate this nginx code in apache?
this is the code from nginx:
it attempts to allow 2 apps to work from the same url.
location /panel {
#alias /home/forge/dashboard_public;
#try_files $uri.html /index.html;
proxy_pass http://localhost:3001;
}
location /panel/static {
#proxy_cache STATIC;
proxy_ignore_headers Cache-Control;
proxy_cache_valid 60m;
proxy_pass http://localhost:3001;
}
location /_next/static {
#proxy_cache STATIC;
# proxy_pass http://localhost:3000;
proxy_pass http://localhost:5000;
}
location /static {
#proxy_cache STATIC;
proxy_ignore_headers Cache-Control;
proxy_cache_valid 60m;
proxy_pass http://localhost:5000;
# proxy_pass http://localhost:3000;
# For testing cache - remove before deploying to production
#add_header X-Cache-Status $upstream_cache_status;
}
location / {
proxy_pass http://localhost:5000;
# proxy_pass http://localhost:3000;
}
this is the apache code i have written:
Define SRVROOT "C:/xampp/apache"
ServerRoot "C:/xampp/apache"
Proxypass /Panel http://localhost:3001
Proxypass /Panel/static http://localhost:3001
Proxypass /static/next_ http://localhost:5000
Proxypass /static http://localhost:5000
Proxypass / http://localhost:5000
ProxyPassReverse /Panel http://localhost:3001
ProxyPassReverse /Panel/static http://localhost:3001
ProxyPassReverse /static/next_ http://localhost:5000
ProxyPassReverse /static http://localhost:5000
ProxyPassReverse / http://localhost:5000
Header set Access-Control-Allow-Origin "*"
I have only just started learning both nginx and apache,
how do i replicate this nginx cod ein apache?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
