LoginSignup
2
1

More than 5 years have passed since last update.

HomesteadでCakePHPを実装

Posted at

「/etc/nginx/sites-available/example.homestead.app」を下記に編集

server {
    listen   80;
    server_name example.homestead.app;

    # root directive should be global
    root   /home/vagrant/Code/example/app/webroot;
    index  index.php;

    access_log off;
    error_log /var/log/nginx/example.homestead.app-error.log error;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }
}

  • NgineXを再起動
sudo xginex -s reload
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1