Hello à tous !
Hier j'ai bidouillé un peu pour héberger un site wordpress, et depuis j'ai des erreurs 404 sur tous les .css et .js de cakebox (j'attrape juste l'index.html..)
J'ai 7 sites en tout et seulement Cakebox qui déconne.
En principe les fichiers rutorrent.conf et cakebox.conf Nginx sont OK, j'ai pas touché la partie cakebox de toute façon.
D'où peux surgir un tel soucis ? Ca fait 2 heures que je cherche sans succès
Cakebox.conf :
server {
listen 81;
server_name _;
# only the proxy
allow 127.0.0.1;
deny all;
root /var/www/cakebox/public/;
access_log /var/log/nginx/cakebox-access.log;
error_log /var/log/nginx/cakebox-error.log;
#site root is redirected to the app boot script
location = / {
try_files @site @site;
}
#all other locations try other files first and go to our front controller if none of them exists
location / {
try_files $uri $uri/ @site;
}
#return 404 for all php files as we do have a front controller
location ~ \.php$ {
return 404;
}
#main configuration
location @site {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
## use debug instead of production to get more log
fastcgi_param APPLICATION_ENV production;
## fastcgi_param HTTPS on;
}
}
rutorrent.conf:
server {
listen 80 default_server;
server_name _;
charset utf-8;
index index.html index.php;
client_max_body_size 10M;
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;
}
### DEFAULT ###
root /var/www;
index index.html index.htm;
server_name _;
location /
{
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
### PROXY ###
location ^~ /proxy {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
}
### PHP MY ADMIN ###
location /phpmyadmin
{
root /var/www;
index index.php index.html index.htm;
}
location ~ ^/phpmyadmin/(.*\.php)$
{
try_files $uri =404;
root /var/www;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
### CAKEBOX ###
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/laurent
{
alias /home/laurent/torrents;
allow all;
satisfy any;
add_header Content-Disposition "attachment";
}
location /LAURENT
{
include scgi_params;
scgi_pass 127.0.0.1:5002;
auth_basic "seedbox";
auth_basic_user_file "/etc/nginx/passwd/rutorrent_passwd_laurent";
}
### RUTORRENT ###
location ^~ /rutorrent {
root /var/www;
include /etc/nginx/conf.d/php.conf;
include /etc/nginx/conf.d/cache.conf;
location ~ /\.svn {
deny all;
}
location ~ /\.ht {
deny all;
}
}
location ^~ /rutorrent/conf/ {
deny all;
}
location ^~ /rutorrent/share/ {
deny all;
}
}
### Autre domaine (speedebike.tk) ###
server {
listen 80;
server_name www.speedebike.tk speedebike.tk;
root /var/www/speedebike;
location / {
root /var/www;
try_files $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|eot|otf|ttf|woff)$ {
access_log off; log_not_found off; expires 30d;
}
location = /robots.txt { access_log off; log_not_found off; }
location ~ /\. { deny all; access_log off; log_not_found off; }
}
Merci d'avance