-
-`/srv/nominatim/build` should be replaced with the location of your
-build directory.
-
-After making changes in the apache config you need to restart apache.
-The website should now be available on http://localhost/nominatim.
-
-#### Configure for use with Nginx
-
-Use php-fpm as a deamon for serving PHP cgi. Install php-fpm together with nginx.
-
-By default php listens on a network socket. If you want it to listen to a
-Unix socket instead, change the pool configuration (`pool.d/www.conf`) as
-follows:
-
- ; Comment out the tcp listener and add the unix socket
- ;listen = 127.0.0.1:9000
- listen = /var/run/php5-fpm.sock
-
- ; Ensure that the daemon runs as the correct user
- listen.owner = www-data
- listen.group = www-data
- listen.mode = 0666
-
-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.
-
-``` 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;
-}