sudo apt-get install php5-fpm sudo vim /etc/php5/fpm/php.ini
cgi.fix_pathinfo=0
safe_mode = Off
sudo service php5-fpm restart
mkdir /usr/share/nginx/www
修改檔案位置,以及網址設定
$baseUrl = 'http://domain.com/path/';
$baseDir = '/PATH/FOLDER/IMAGES';
but, it works
chmod 777 $FOLDER_PATH
edit nginx
server {
listen 80;
root /usr/share/nginx/www;
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;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:1337;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
留言
張貼留言