]> git.openstreetmap.org Git - nominatim.git/commitdiff
improve syntax highlighting for apache and nginx examples
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 13 May 2020 08:13:15 +0000 (10:13 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 13 May 2020 08:13:15 +0000 (10:13 +0200)
docs/admin/Import-and-Update.md
docs/admin/Installation.md

index 0d1bb027e9e0a7d45084d61b2aa5e494aaef32aa..47516a2b006d19c1cc66e44df46dd8663431d6ea 100644 (file)
@@ -319,4 +319,4 @@ behind the scenes.)
 
 If you have imported multiple country extracts and want to keep them
 up-to-date, [Advanced installations section](Advanced-Installations.md) contains instructions 
-to set up and update multiple country extracts.
\ No newline at end of file
+to set up and update multiple country extracts.
index 98cfe573c6018fb088b22726d566a7da38819dad..f3f54794c0a98746c6925721884f17bbe5637d2d 100644 (file)
@@ -125,13 +125,15 @@ from there.
 Make sure your Apache configuration contains the required permissions for the
 directory and create an alias:
 
-    <Directory "/srv/nominatim/build/website">
-      Options FollowSymLinks MultiViews
-      AddType text/html   .php
-      DirectoryIndex search.php
-      Require all granted
-    </Directory>
-    Alias /nominatim /srv/nominatim/build/website
+``` apache
+<Directory "/srv/nominatim/build/website">
+  Options FollowSymLinks MultiViews
+  AddType text/html   .php
+  DirectoryIndex search.php
+  Require all granted
+</Directory>
+Alias /nominatim /srv/nominatim/build/website
+```
 
 `/srv/nominatim/build` should be replaced with the location of your
 build directory.
@@ -159,30 +161,32 @@ follows:
 Tell nginx that php files are special and to fastcgi_pass to the php-fpm
 unix socket by adding the location definition to the default configuration.
 
-    root /srv/nominatim/build/website;
-    index search.php;
-    location / {
-        try_files $uri $uri/ @php;
-    }
-
-    location @php {
-        fastcgi_param SCRIPT_FILENAME "$document_root$uri.php";
-        fastcgi_param PATH_TRANSLATED "$document_root$uri.php";
-        fastcgi_param QUERY_STRING    $args;
-        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
-        fastcgi_index index.php;
-        include fastcgi_params;
-    }
-
-    location ~ [^/]\.php(/|$) {
-        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
-        if (!-f $document_root$fastcgi_script_name) {
-            return 404;
-        }
-        fastcgi_pass unix:/var/run/php7.3-fpm.sock;
-        fastcgi_index search.php;
-        include fastcgi.conf;
+``` nginx
+root /srv/nominatim/build/website;
+index search.php;
+location / {
+    try_files $uri $uri/ @php;
+}
+
+location @php {
+    fastcgi_param SCRIPT_FILENAME "$document_root$uri.php";
+    fastcgi_param PATH_TRANSLATED "$document_root$uri.php";
+    fastcgi_param QUERY_STRING    $args;
+    fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
+    fastcgi_index index.php;
+    include fastcgi_params;
+}
+
+location ~ [^/]\.php(/|$) {
+    fastcgi_split_path_info ^(.+?\.php)(/.*)$;
+    if (!-f $document_root$fastcgi_script_name) {
+        return 404;
     }
+    fastcgi_pass unix:/var/run/php7.3-fpm.sock;
+    fastcgi_index search.php;
+    include fastcgi.conf;
+}
+```
 
 Restart the nginx and php5-fpm services and the website should now be available
 at `http://localhost/`.