I hope that someone can understand and help me, sorry because my English!
After build my own nginx and php-fcgi/php-fpm and it can run good. But when I test by try post a new thread (or reply another thread), there is a feature insert picture or video on my post. This is really cool feature because vbulletin help user attach file/image and use it in his post.
For image, member can upload image from local computer, or insert the image's url. Server will receive/get the image to store on server, and then display it at the current cursor on editor dialog.
This feature runs by open a dialog for member. Maybe it runs as js script (I don't know). But when I use this feature and wait for dialog open, but when dialog appears it closes as soon as possible. I think that there is a problem in nginx's configuration. But I don't know why and where to fix it.
This is my configuration:
pid logs/nginx.pid;
user nginx;
#error_log /dev/null crit;
error_log /var/log/nginx/nginx_error.log warn;
worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
## General Options
ignore_invalid_headers on;
keepalive_timeout 10 60;
keepalive_requests 10;
recursive_error_pages on;
server_tokens off;
server_name_in_redirect off;
sendfile on;
open_file_cache max=2000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
## TCP options
tcp_nopush on;
tcp_nodelay on;
## Compression
gzip on;
gzip_buffers 64 8k;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_min_length 100;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_vary on;
## Log Format
log_format main '$remote_addr $host $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';
## Deny access to any host other than (www.)mydomain.com
server {
listen 8080;
server_name _; #default
return 444;
}
server {
listen 8080;
server_name mydomain.com;
error_log /var/log/nginx/mydomain.error.log;
index index.php index.html index.htm;
root /home/forum/public_html;
fastcgi_intercept_errors off;
## Redirect from www to non-www
if ($host = 'www.mydomain.com' ) {
rewrite ^/(.*)$ http://mydomain.com:8080/$1 permanent;
}
location / {
try_files $uri $uri/ /index.php;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
log_not_found off;
}
location ~* \.php$ {
if (!-f $request_filename) {
return 404;
}
include fastcgi_params;
fastcgi_pass php;
}
# We don't want to allow the browsers to see .hidden linux/unix files
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
}
# If running php as fastcgi, specify php upstream.
upstream php {
# server unix:/tmp/php-cgi.socket;
# server 127.0.0.1:9000;
server unix:/tmp/php-fpm.socket;
}
}