Skip to content

Commit

Permalink
πŸ› FIX: #90 nginx server requires trailing slash for phpmyadmin url
Browse files Browse the repository at this point in the history
  • Loading branch information
apolopena committed Apr 8, 2021
1 parent 525e9df commit 5ac0266
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .gp/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ http {
# Other Configs
include /etc/nginx/conf.d/*.conf;

upstream fastcgi_backend {
server 127.0.0.1:9000;
}
upstream fastcgi_backend {
server 127.0.0.1:9000;
}

index index.html index.htm index.php;
server {
set_by_lua $nginx_docroot_in_repo 'return os.getenv("NGINX_DOCROOT_IN_REPO")';
set_by_lua $gitpod_repo_root 'return os.getenv("GITPOD_REPO_ROOT")';
Expand All @@ -41,12 +43,15 @@ http {
root $gitpod_repo_root/$nginx_docroot_in_repo;

location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
location ~* \.php$ {
try_files $uri =404;
include snippets/fastcgi-php.conf;
fastcgi_pass fastcgi_backend;
rewrite ^/index(?:\.php|/)?$ / permanent;
rewrite ^/(.*)/index(?:\.php|/)?$ /$1 permanent;
rewrite ^/(.*)(?:\.php|/)$ /$1 permanent;
}
}
}

0 comments on commit 5ac0266

Please sign in to comment.