Bonsoir,
j'ai un soucis avec ma config owncloud... (ou peut etre avec le reste !) en gros tout marchais bien, puis j'ai traficoté et j'ai une situation très déplaisante... des que je cherche mon domaine.fr j'ai une redirection vers cloud.mondomaine.fr (mon sous domaine pour owncloud)
Je sent bien que sa chie du coté de nginx mais le bouzin me dépasse un peu !
des que ça sort des chemins battu j'avoue que j'avance à taton et ça marche ! mais là je suis obligé de demander de l'aide ... J'ai meme pas le début d'une piste
je me permet de mettre mes conf nginx pour owncloud et rutorrent (et plein de trucs c'est un four-tout le machin !)
merci d'avance
owncloud.conf
upstream php-handler {
#server 127.0.0.1:9000;
server unix:/var/run/php5-fpm.sock;
}
server {
listen 80;
server_name cloud.qacfamille.fr.cr;
return 301 https://$server_name$request_uri; # enforce https
}
server {
listen 443 ssl;
server_name cloud.qacfamille.fr.cr;
index index.html index.php;
charset utf-8;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/owncloud-access.log combined;
error_log /var/log/nginx/owncloud-error.log error;
# Path to the root of your installation
root /var/www/owncloud/;
client_max_body_size 10G; # set max upload size
fastcgi_buffers 64 4K;
rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
index index.php;
error_page 403 /core/templates/403.php;
error_page 404 /core/templates/404.php;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
location / {
# The following 2 rules are only needed with webfinger
rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
try_files $uri $uri/ index.php;
}
location ~ ^(.+?\.php)(/.*)?$ {
try_files $1 = 404;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$1;
fastcgi_param PATH_INFO $2;
fastcgi_param HTTPS on;
fastcgi_pass php-handler;
}
# Optional: set long EXPIRES header on static assets
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don't log access to assets
access_log off;
}
}
reste.conf
server {
listen 80 default_server;
listen 443 default_server ssl;
server_name qacfamille.fr.cr;
index index.html index.php;
charset utf-8;
client_max_body_size 30000M;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
access_log /var/log/nginx/rutorrent-access.log combined;
error_log /var/log/nginx/rutorrent-error.log error;
error_page 500 502 503 504 /50x.html;
location = /50x.html { root /usr/share/nginx/html; }
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd";
location = /favicon.ico {
access_log off;
log_not_found off;
}
## début config accueil serveur ##
location ^~ / {
root /var/www/base;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config accueil serveur ##
## début config proxy ##
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## fin config proxy ##
## début config rutorrent ##
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
## fin config rutorrent ##
## début config munin ##
location ^~ /graph {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
location ^~ /graph/img {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
error_log /dev/null crit;
}
location ^~ /monitoring {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
}
## fin config munin ##
## début config seedbox-manager ##
location ^~ /seedbox-manager {
alias /var/www/seedbox-manager/public;
include /etc/nginx/conf.d/php-manager;
include /etc/nginx/conf.d/cache;
}
## fin config seedbox-manager ##
## config utilisateurs ##
location /QUENTIN {
include scgi_params;
scgi_pass 127.0.0.1:5001; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_quentin";
}
location /BASILE {
include scgi_params;
scgi_pass 127.0.0.1:5003; #ou socket : unix:/home/username/.session/username.socket
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_basile";
}
## debut config cakebox-light ##
location /cakebox/ {
rewrite ^/cakebox(/.*)$ $1 break;
proxy_pass http://127.0.0.1:81;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
location /cakebox/quentin/ {
alias /home/quentin/torrents/;
add_header Content-Disposition "attachment";
satisfy any;
allow all;
}
## etc si d'autre utilisateur ##
## fin config cakebox-light ##
## début config codiad ##
location ^~ /codiad {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config codiad ##
## début config Lychee ##
location ^~ /lychee {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config Lychee ##
## début config alice ##
location ^~ /alice {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
fastcgi_index index.php;
satisfy any;
allow all;
}
## fin config alice ##
## début config phpmyadmin ##
location ^~ /phpmyadmin {
root /var/www;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config phpmyadmin ##
## début config phpmyadmin ##
location ^~ /websync {
root /root/websync/websync/app/views;
include /etc/nginx/conf.d/php;
include /etc/nginx/conf.d/cache;
satisfy any;
allow all;
}
## fin config phpmyadmin ##
}