Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to designate an alternative site for rompr? #11

Hi,

I'm trying to run RompR on a RPi3B running the DietPi OS, which already has a service using the default website. As a result, I don't want to have rompr as my default website for the server. The rompR docs assume I'll know how to deal with this situation, but, unfortunately, I don't know how to.

Can someone tell me how to change my config files to have rompr use another site/socket? (I'm using nginx, not apache.)

Thanks,

Mike

  • replies 1
  • views 2.9K
  • likes 0
#2

Ha, you caught me out. I didn't know how to do it when I wrote those docs :)

However, I've just done the following on Ubuntu and it worked, so I suggest this. I'm not sure it's the best way but it's the only way I can find to make it work when you have another site being the default. I'm no expert on configuring nginx.

All I did was to copy the following into my existing default config, inside the server section. On Ubuntu this is the file /etc/nginx/sites-available/default. Remember to set the fastcgi_pass parameter as appropriate to the version numbers on your system.

location /rompr/ {
    allow all;
    index index.php;
    location ~ \.php {
            try_files $uri index.php =404;
            fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $request_filename;
            include /etc/nginx/fastcgi_params;
            fastcgi_read_timeout 1800;
    }
    error_page 404 = /404.php;
    try_files $uri $uri/ =404;
    location ~ /albumart/* {
            expires -1s;
    }
}

Now you ned to symlink your rompr installation into the default directory structure. The directory I'm going to refer to as /ROOT/DIRECTORY here is the one specified as 'root' in your existing default config file

sudo ln -s /PATH/TO/ROMPR /ROOT/DIRECTORY/rompr

where /PATH/TO/ROMPR is as referred to in the docs.

Then restart nginx and you should have a http://your.host/rompr working.