Skip to content

Commit

Permalink
mysql.php gor renamed to sql.php in 3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF authored Dec 6, 2023
1 parent 71edc17 commit c4e0f0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions wiki/webserver/ExternalWebserversSQL.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ from the MySQL-Server.

Luckily BlueMap provides such a script. A PHP-Script to be exact. This means the first thing you need to do is to make sure
that you have PHP (>= 7.4) installed on your webserver.
Then you go into the webroot and open the `mysql.php`, and set your MySQL-Connection settings there.
Then you go into the webroot and open the `sql.php`, and set your MySQL-Connection settings there.

> **Important:**
> Make sure that your php-setup is working, otherwise you might accidentally leak those SQL-Connection-Settings to the world!
{: .info .important }

Now you need to configure your webserver, so that it rewrites all requests for which no static file exists to the `mysql.php`.
Now you need to configure your webserver, so that it rewrites all requests for which no static file exists to the `sql.php`.

## NGINX
On nginx this can be achieved with e.g. `try_files $uri /mysql.php;`.
On nginx this can be achieved with e.g. `try_files $uri /sql.php;`.

With some context your website-config could look something like this:
```nginx
Expand All @@ -49,7 +49,7 @@ server {
root /var/www;
location / {
try_files $uri /mysql.php;
try_files $uri /sql.php;
}
location ~ \.php$ {
Expand Down Expand Up @@ -84,8 +84,8 @@ DocumentRoot /var/www/
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite request to the mysql.php
RewriteRule ^.*$ /mysql.php [L]
# Rewrite request to the sql.php
RewriteRule ^.*$ /sql.php [L]
</Directory>
# OPTIONAL:
Expand Down

0 comments on commit c4e0f0d

Please sign in to comment.