diff --git a/README.md b/README.md index 0a800149..2738d002 100644 --- a/README.md +++ b/README.md @@ -157,7 +157,7 @@ systemctl restart lms __Note__: don't forget to give the _lms_ user read access to the music directory you want to scan. ### Configuration -_LMS_ uses a configuration file, installed by default in `/etc/lms.conf`. It is recommended to edit this file and change relevant settings (listen address, listen port, working directory, Subsonic API activation, ...). +_LMS_ uses a configuration file, installed by default in `/etc/lms.conf`. It is recommended to edit this file and change relevant settings (listen address, listen port, working directory, Subsonic API activation, deployment path, ...). All other settings are set using the web interface (user management, scan settings, transcode settings, ...). diff --git a/conf/lms.conf b/conf/lms.conf index 2c186cb3..04d48d54 100644 --- a/conf/lms.conf +++ b/conf/lms.conf @@ -18,6 +18,9 @@ listen-port = 5082; listen-addr = "0.0.0.0"; behind-reverse-proxy = false; +# Location for deployment +deploy-path = "/"; + # If enabled, these files have to exist and have correct permissions tls-enable = false; tls-cert = "/var/lms/cert.pem"; diff --git a/src/libs/subsonic/include/subsonic/SubsonicResource.hpp b/src/libs/subsonic/include/subsonic/SubsonicResource.hpp index af9bc53c..1d8746e7 100644 --- a/src/libs/subsonic/include/subsonic/SubsonicResource.hpp +++ b/src/libs/subsonic/include/subsonic/SubsonicResource.hpp @@ -36,7 +36,7 @@ class SubsonicResource final : public Wt::WResource public: SubsonicResource(Database::Db& db); - static std::string getPath() { return "/rest/"; } + static std::string getPath() { return "rest/"; } private: void handleRequest(const Wt::Http::Request &request, Wt::Http::Response &response) override; diff --git a/src/lms/main.cpp b/src/lms/main.cpp index 16c333d1..18dcd7f2 100644 --- a/src/lms/main.cpp +++ b/src/lms/main.cpp @@ -48,6 +48,7 @@ std::vector generateWtConfig(std::string execPath) args.push_back("--config=" + wtConfigPath.string()); args.push_back("--docroot=" + ServiceProvider::get()->getString("docroot")); args.push_back("--approot=" + ServiceProvider::get()->getString("approot")); + args.push_back("--deploy-path=" + ServiceProvider::get()->getString("deploy-path", "/")); args.push_back("--resources-dir=" + ServiceProvider::get()->getString("wt-resources")); if (ServiceProvider::get()->getBool("tls-enable", false))