gpt-4o-2024-05-13· OpenAI
WildChat-4.8M (AI2)
Transform this apache config to nginx config: [code]
- User
Transform this apache config to nginx config:
<VirtualHost *:80> # ServerName my.domain.name # this is the passenger config RailsEnv production SetEnv REDMINE_INSTANCE "default" # CHANGE PassengerAppGroupName FOR OTHER INSTANCES PassengerAppGroupName redmine_default PassengerDefaultUser www-data PassengerRestartDir /var/cache/redmine/default/tmp/ Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/ DocumentRoot /usr/share/redmine/public <Directory "/usr/share/redmine/public"> Allow from all Options -MultiViews Require all granted </Directory> <Directory "/var/cache/redmine/default/plugin_assets/"> Allow from all Options -MultiViews Require all granted </Directory> </VirtualHost> - Assistant
Here is the equivalent Nginx configuration for the given Apache configuration:
server { listen 80; # ServerName my.domain.name # This is the passenger config passenger_enabled on; passenger_app_env production; passenger_app_group_name redmine_default; passenger_user www-data; passenger_restart_dir /var/cache/redmine/default/tmp; set $redmine_instance "default"; root /usr/share/redmine/public; location / { alias /usr/share/redmine/public/; passenger_base_uri /; passenger_document_root /usr/share/redmine/public; passenger_app_root /usr/share/redmine; passenger_env_var REDMINE_INSTANCE default; passenger_enabled on; allow all; options -MultiViews; } location /plugin_assets/ { alias /var/cache/redmine/default/plugin_assets/; passenger_enabled off; allow all; options -MultiViews; } # Access rules for directories location ~ ^/usr/share/redmine/public/ { allow all; options -MultiViews; } location ~ ^/var/cache/redmine/default/plugin_assets/ { allow all; options -MultiViews; } access_log /var/log/nginx/redmine_access.log; error_log /var/log/nginx/redmine_error.log; }