I'd like to know where the configuration file of the apache web server is in the raspberry pi version of OMV. I wan't to use OMV and and Whatsspy on one Pi. The directory where the configuration file should be (/etc/apache2/) is empty.
Apache2 Configuration
-
- OMV 2.x
- Carl Hauschke
-
-
Try /etc/nginx.
We are using nginx here, not apach2.
-
Thanks for your answer. I'll definitely try this.
I'm new to the Linux world. Do you know how I can configure nginx to host the webinterface of OMV on Port 81 and another webpage on port 80? -
-
Yes you can. Set the ports in the web GUI.
-
I have to set the Port of OMV with the omv-firstaid command. If I do it with the Web GUI it fails. But how can I set up an additional web server. I managed to get a result in my browser. But this is only a 403 access dennied.
-
You should give more information about what site you are trying to serve. It is a web application or a personal site? It is impossible to help with so limited information.
If you change the web gui port in the web gui it should not be failing. I have never changed to port for the web gui via omv-firstaid but I think you this should work OK as well. Something else is probably to blame in your configuration.
If you are using a firewall did you open new port where you move web gui too???
EDIT: I just tested moving the web gui port to another port with omv-firstaid. It worked perfect.
-
-
I'm trying to serve the WhatsSpy Public on port 80 and the web GUI of OMV on port 81.
WhatsSpy uses postgresql, nginx and php5. I think the step of the configuration of nginx is the problem. In the instructions of WhatsSpy the say I have to change the Configuration in /etc/nginx/sites-available/default. But the Pi image of OMV does not have this file. I think it uses the openmediavault-webgui file which is located in the same folder but if I Insert the code I'm supposed to put into the default configuration I get a 403 Forbidden.
The code which should be inserted:server {
listen 80;
root /var/www;
index index.html index.php;location /whatsspy/api/whatsapp/ {
deny all;
return 404;
}location /whatsspy/images/profilepicture/ {
deny all;
return 404;
}location ~ ^/whatsspy/api/((?!index\.php).+) {
deny all;
return 404;
}location ~ /whatsspy/api/$ {
index index.php;
}location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}}
How my openmediavault-webgui now looks:
server {
server_name openmediavault-webgui;
root /var/www/openmediavault;
index index.php;
autoindex off;
server_tokens off;
sendfile on;
large_client_header_buffers 4 32k;
client_max_body_size 25M;
error_log /var/log/nginx/openmediavault-webgui_error.log error;
access_log /var/log/nginx/openmediavault-webgui_access.log combined;
location /extjs/ {
alias /usr/share/javascript/extjs5/;
}
location /images/ {
alias /var/www/openmediavault/images/;
}
location ~ \.php$ {
try_files $uri = 404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm-openmediavault-webgui.sock;
fastcgi_index index.php;
fastcgi_read_timeout 60s;
include fastcgi_params;
}
listen [::]:81 default_server ipv6only=off;
include /etc/nginx/openmediavault-webgui.d/*.conf;
}
server {
listen 80;
root /var/www;
index index.html index.php;
location /whatsspy/api/whatsapp/ {
deny all;
return 404;
}
location /whatsspy/images/profilepicture/ {
deny all;
return 404;
}
location ~ ^/whatsspy/api/((?!index\.php).+) {
deny all;
return 404;
}
location ~ /whatsspy/api/$ {
index index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
I tried to comment out the OMV WebGUI but this doesn't change the problem.
I hope this does help. I really appreciate your help. -
Carl, if you click on source before you paste you will not lose your formatting as you did above. It will keep correct spacing.
OK, the server file needs to go into /etc/nginx/sites-available but does not need to be called default. I would call the file whatsspy so it is more descriptive and you know what it is.
cd /etc/nginx/sites-available
touch whatsspy
then edit it and put your server contents into the file with correct formatting.You will need to adjust the location lines and I recommend you create a whatspy folder at /var/www/whatsspy and then adjust the location line accordingly. Then cd /var/www and chown -R www-data:www-data whatsspy
You then need to create a pool file and add a line to the server config file above.
The pool files go here /etc/php5/fpm/pool.d
I would just call it whatspy.conf:
cd /etc/php5/fpm/pool.d
touch whatsspy.confThen put in these contents:
Code
Alles anzeigen[whatsspy] listen = /var/run/php5-fpm-whatsspy.sock listen.owner = www-data listen.group = www-data listen.mode = 0600 user = www-data group = www-data pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3
Then go back an edit you server file for nginx:
cd /etc/nginx/sites-available
nano whatsspyEdit this line: "fastcgi_pass unix:/var/run/php5-fpm.sock;"
Change it to this: "fastcgi_pass unix:/var/run/php5-fpm-whatsspy.sock;"
Save it.Then this command to create symlink to sites-enabled:
nginx_modsite -e whatsspy
or
nginx_ensite whatsspyReboot and it should be working if that server config it OK.
PS- most people are using the nginx website plugin to do this. It makes it a lot easier.
PPS- You don't need to use or name a server config file for nginx default. What is important is that only one server config will be listening on port 80. If you bind more than one server to same port nginx will not start. So say the default config was uncommented on the listening line for port 80 and then put in another server listening on port 80. That is bad.
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!