Merhaba ,
Facebook applikasyonu yapmak için secure routelara ihtiyacım oldu fakat başaramıyorum. Ne yapmam gerektiğini tam olarak anlamadım.
Aşağıdaki routeları Https üzerinden çalıştırmayı deniyorum:
Route::get('iste-o-an', ['https' ,'as'=>'iste-o-an','uses'=>'PageController@getContest']);
Route::get('foo', array('before' => 'force.ssl','https', function()
{
return 'Must be over HTTPS';
}));
filter.php ye şunu ekledim:
Route::filter('force_ssl', function()
{
if(!Request::secure())
{
return Redirect::secure(Request::getRequestUri());
}
});
Fakat "notfoundhttp" alıyorum: sebebi nginx ayalarım olabilir diye düşünüyorum :
server {
listen 80;
listen 443 ssl;
server_name remaker.dev;
access_log /var/log/nginx/sirtcantalilar.dev/access.log;
error_log /var/log/nginx/sirtcantalilar.dev/error.log;
#rewrite_log on;
root /home/ytsejam/public_html/remaker/public;
index index.php;
ssl on;
ssl_certificate /srv/ssl/nginx.pem;
ssl_certificate_key /srv/ssl/nginx.key;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers HIGH:!ADH:!MD5;
# Added cache headers for images, quick fix for cloudfront.
location ~* \.(png|jpg|jpeg|gif)$ {
expires 30d;
log_not_found off;
}
# Only 3 hours on CSS/JS to allow me to roll out fixes during
# early weeks.
location ~* \.(js|css|ico)$ {
expires 3h;
log_not_found off;
}
# Heres my redirect, try normal URI and then our Laravel urls.
location / {
try_files $uri $uri/ /index.php?$query_string;
# A bunch of perm page redirects from my old
# site structure for SEO purposes. Not interesting.
}
# Look below for this. I decided it was common to Laravel
# sites so put it in an extra template.
# Rewrite for content.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
Bu konuda ne yapabilirim. Teşekkür ederim.
location ~* \.php$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_index index.php;
fastcgi_intercept_errors off;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
# Typical vars in here, nothing interesting.
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}