• 29-05-2015, 21:21:34
    #1
    dev
    Kurumsal Üye
    Merhaba. Htaccess deki RewriteRule leri nginx için çevirdim kayıt ettim. Linklerin sonunda .html var . Siteyi girip alt sayfalara tıkladığım zaman dosyayı indiriyor. Sonun ne olduğunu bilen var mı ?
  • 29-05-2015, 21:27:02
    #2
    Nginx conf atabilir misin buraya?
  • 29-05-2015, 21:35:08
    #3
    dev
    Kurumsal Üye
    iyi adlı üyeden alıntı: mesajı görüntüle
    Nginx conf atabilir misin buraya?
    server {
    		server_name siteadi.com www.siteadi.com;
    		listen xxx.xxx.xx.xx;
    		root /home/siteadi/public_html;
    		index index.html index.htm index.php;
    		access_log /var/log/virtualmin/siteadi.com_access_log;
    		error_log /var/log/virtualmin/siteadi.com_error_log;
    		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    		fastcgi_param SERVER_SOFTWARE nginx;
    		fastcgi_param QUERY_STRING $query_string;
    		fastcgi_param REQUEST_METHOD $request_method;
    		fastcgi_param CONTENT_TYPE $content_type;
    		fastcgi_param CONTENT_LENGTH $content_length;
    		fastcgi_param SCRIPT_FILENAME /home/siteadi/public_html$fastcgi_script_name;
    		fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    		fastcgi_param REQUEST_URI $request_uri;
    		fastcgi_param DOCUMENT_URI $document_uri;
    		fastcgi_param DOCUMENT_ROOT /home/siteadi/public_html;
    		fastcgi_param SERVER_PROTOCOL $server_protocol;
    		fastcgi_param REMOTE_ADDR $remote_addr;
    		fastcgi_param REMOTE_PORT $remote_port;
    		fastcgi_param SERVER_ADDR $server_addr;
    		fastcgi_param SERVER_PORT $server_port;
    		fastcgi_param SERVER_NAME $server_name;
    		fastcgi_param HTTPS $https;
    location / {
    if ($http_host ~ "^siteadi.com"){
    rewrite ^(.*)$ http://www.siteadi.com/$1 redirect;
    }
    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html$ /index.php?act=oyun&oyunsef=$2&kategori=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html/([0-9]+)$ /index.php?act=oyun&oyunsef=$2&kategori=$1&sayfa=$3 break;
    rewrite ^/([_A-Za-z0-9-]+)$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)/$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    }
    location /yeni {
    rewrite ^/yeni-oyunlar/$ /index.php?act=sayfa&do=yeni break;
    }
    location /populer {
    rewrite ^/populer-oyunlar/$ /index.php?act=sayfa&do=populer break;
    }
    location /secilmis {
    rewrite ^/secilmis-oyunlar/$ /index.php?act=sayfa&do=editor break;
    }
    location = /iletisim {
    rewrite ^(.*)$ /index.php?act=sayfa&do=iletisim break;
    }
    location = /hata {
    rewrite ^(.*)$ /index.php?act=sayfa&do=hata break;
    }
    location = /gizlilik {
    rewrite ^(.*)$ /index.php?act=sayfa&do=gizlilik break;
    }
    location = /panel {
    rewrite ^(.*)$ /panel/index.php break;
    }
    location /oyna {
    rewrite ^/oyna/([_A-Za-z0-9-]+).html$ /index.php?act=oyna&sef=$1 break;
    }
    location = /sitemap.xml {
    rewrite ^(.*)$ /index.php?act=sitemap;
    }
    location = /rss.xml {
    rewrite ^(.*)$ /index.php?act=rss;
    }
    location = /robots.txt {
    rewrite ^(.*)$ /index.php?act=sayfa&do=robots break;
    }
    location /oyun {
    rewrite ^/oyun/(.*)/([0-9]+)$ /index.php?act=ara&et=$1&sayfa=$2 break;
    rewrite ^/oyun/(.*)$ /index.php?act=ara&et=$1&sayfa=$2 break;
    }
    location /ara {
    rewrite ^/ara/(.*)/([0-9]+)$ /index.php?act=ara&t=$1&sayfa=$2 break;
    rewrite ^/ara/(.*)$ /index.php?act=ara&t=$1&sayfa=$2 break;
    }
    		location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_pass unix:/var/php-nginx/143292223218290.sock/socket;
    		}
    		listen 185.92.223.231:443 ssl;
    		ssl_certificate /home/siteadi/ssl.cert;
    		ssl_certificate_key /home/siteadi/ssl.key;
    	}
    }
  • 29-05-2015, 22:18:04
    #4
    Meftun adlı üyeden alıntı: mesajı görüntüle
    server {
    		server_name siteadi.com www.siteadi.com;
    		listen xxx.xxx.xx.xx;
    		root /home/siteadi/public_html;
    		index index.html index.htm index.php;
    		access_log /var/log/virtualmin/siteadi.com_access_log;
    		error_log /var/log/virtualmin/siteadi.com_error_log;
    		fastcgi_param GATEWAY_INTERFACE CGI/1.1;
    		fastcgi_param SERVER_SOFTWARE nginx;
    		fastcgi_param QUERY_STRING $query_string;
    		fastcgi_param REQUEST_METHOD $request_method;
    		fastcgi_param CONTENT_TYPE $content_type;
    		fastcgi_param CONTENT_LENGTH $content_length;
    		fastcgi_param SCRIPT_FILENAME /home/siteadi/public_html$fastcgi_script_name;
    		fastcgi_param SCRIPT_NAME $fastcgi_script_name;
    		fastcgi_param REQUEST_URI $request_uri;
    		fastcgi_param DOCUMENT_URI $document_uri;
    		fastcgi_param DOCUMENT_ROOT /home/siteadi/public_html;
    		fastcgi_param SERVER_PROTOCOL $server_protocol;
    		fastcgi_param REMOTE_ADDR $remote_addr;
    		fastcgi_param REMOTE_PORT $remote_port;
    		fastcgi_param SERVER_ADDR $server_addr;
    		fastcgi_param SERVER_PORT $server_port;
    		fastcgi_param SERVER_NAME $server_name;
    		fastcgi_param HTTPS $https;
    location / {
    if ($http_host ~ "^siteadi.com"){
    rewrite ^(.*)$ http://www.siteadi.com/$1 redirect;
    }
    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html$ /index.php?act=oyun&oyunsef=$2&kategori=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html/([0-9]+)$ /index.php?act=oyun&oyunsef=$2&kategori=$1&sayfa=$3 break;
    rewrite ^/([_A-Za-z0-9-]+)$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)/$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    }
    location /yeni {
    rewrite ^/yeni-oyunlar/$ /index.php?act=sayfa&do=yeni break;
    }
    location /populer {
    rewrite ^/populer-oyunlar/$ /index.php?act=sayfa&do=populer break;
    }
    location /secilmis {
    rewrite ^/secilmis-oyunlar/$ /index.php?act=sayfa&do=editor break;
    }
    location = /iletisim {
    rewrite ^(.*)$ /index.php?act=sayfa&do=iletisim break;
    }
    location = /hata {
    rewrite ^(.*)$ /index.php?act=sayfa&do=hata break;
    }
    location = /gizlilik {
    rewrite ^(.*)$ /index.php?act=sayfa&do=gizlilik break;
    }
    location = /panel {
    rewrite ^(.*)$ /panel/index.php break;
    }
    location /oyna {
    rewrite ^/oyna/([_A-Za-z0-9-]+).html$ /index.php?act=oyna&sef=$1 break;
    }
    location = /sitemap.xml {
    rewrite ^(.*)$ /index.php?act=sitemap;
    }
    location = /rss.xml {
    rewrite ^(.*)$ /index.php?act=rss;
    }
    location = /robots.txt {
    rewrite ^(.*)$ /index.php?act=sayfa&do=robots break;
    }
    location /oyun {
    rewrite ^/oyun/(.*)/([0-9]+)$ /index.php?act=ara&et=$1&sayfa=$2 break;
    rewrite ^/oyun/(.*)$ /index.php?act=ara&et=$1&sayfa=$2 break;
    }
    location /ara {
    rewrite ^/ara/(.*)/([0-9]+)$ /index.php?act=ara&t=$1&sayfa=$2 break;
    rewrite ^/ara/(.*)$ /index.php?act=ara&t=$1&sayfa=$2 break;
    }
    		location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_pass unix:/var/php-nginx/143292223218290.sock/socket;
    		}
    		listen 185.92.223.231:443 ssl;
    		ssl_certificate /home/siteadi/ssl.cert;
    		ssl_certificate_key /home/siteadi/ssl.key;
    	}
    }
    location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_pass unix:/var/php-nginx/143292223218290.sock/socket;
    		}
    location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }
    Değiştirip restart atar mısın nginx e?
  • 29-05-2015, 22:25:22
    #5
    dev
    Kurumsal Üye
    iyi adlı üyeden alıntı: mesajı görüntüle
    location ~ \.php$ {
    			try_files $uri =404;
    			fastcgi_pass unix:/var/php-nginx/143292223218290.sock/socket;
    		}
    location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }
    Değiştirip restart atar mısın nginx e?
    Denedim bu sefer site açılmadı 502 hatası verdi
  • 29-05-2015, 22:26:43
    #6
    Meftun adlı üyeden alıntı: mesajı görüntüle
    Denedim bu sefer site açılmadı 502 hatası verdi
    php5-fpm paketi kurulu mu?
  • 29-05-2015, 22:29:30
    #7
    dev
    Kurumsal Üye
    iyi adlı üyeden alıntı: mesajı görüntüle
    php5-fpm paketi kurulu mu?
    hayır php-fpm kurlu değil değil. Webmin kurlumu yaptım onunla otomatik fastcgi kuruldu.
  • 29-05-2015, 22:33:39
    #8
    Meftun adlı üyeden alıntı: mesajı görüntüle
    hayır php-fpm kurlu değil değil. Webmin kurlumu yaptım onunla otomatik fastcgi kuruldu.
    Ubuntu
    "sudo apt-get install php5-fpm"

    Centos
    "sudo yum install php-fpm"

    Kurduktan sonra reboot atıp tekrar bak bakalım bi.
  • 29-05-2015, 23:12:20
    #9
    dev
    Kurumsal Üye
    iyi adlı üyeden alıntı: mesajı görüntüle
    Ubuntu
    "sudo apt-get install php5-fpm"

    Centos
    "sudo yum install php-fpm"

    Kurduktan sonra reboot atıp tekrar bak bakalım bi.
    Deniyorum. Ek olarak wordpressde her hangi bir sorun olmadı.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 22:37:53 -->-> Daha önceki mesaj 22:35:47 --

    Yine aynı oldu "502 Bad Gateway" hatası verdi.

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 23:12:20 -->-> Daha önceki mesaj 22:37:53 --

    @iyi

    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html$ /index.php?act=oyun&oyunsef=$2&kategori=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([_A-Za-z0-9-]+).html/([0-9]+)$ /index.php?act=oyun&oyunsef=$2&kategori=$1&sayfa=$3 break;
    rewrite ^/([_A-Za-z0-9-]+)$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/$ /index.php?act=kategori&sef=$1 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    rewrite ^/([_A-Za-z0-9-]+)/([0-9]+)/$ /index.php?act=kategori&sef=$1&sayfa=$2 break;
    Buradaki "break" kısımlarını "last" ile değiştirdim şimdilik bir sorun yok gibi. Yardımın için teşekkürler