Update:
i found out that the nginx file for the other site routes was not set up properly. to fix, i vagrant ssh into the box
cd /etc/nginx/sites-available
LS to see all the files. In my case i only saw homestead.app.
create a nginx file with your correct configurations.
sudo vi /etc/nginx/sites-enabled/{app name.app}
here are the nginx configurations changed to reflect my app route. im not sure if my ssl changes are correct:
server {
listen 80;
server_name {myapp}.app;
root "/home/vagrant/Code/{myapp}/public";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/{myapp}.app-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-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;
}
location ~ /\.ht {
deny all;
}
}
server {
listen 443;
server_name {myapp}.app;
root "/home/vagrant/Code/{myapp}/public";
index index.html index.htm index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
access_log off;
error_log /var/log/nginx/{myapp}.app-ssl-error.log error;
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-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;
}
location ~ /\.ht {
deny all;
}
ssl on;
ssl_certificate /etc/nginx/ssl/{myapp}.app.crt;
ssl_certificate_key /etc/nginx/ssl/{myapp}.app.key;
}
save the file and run
sudo service nginx reload
and your sites should now be available given all other configurations(etc/hosts and homestead.yaml) are done and pointing to the right places.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community