This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#the configuration on apache configuration | |
#you can find the configuration on | |
#C:\xampp\apache\conf\httpd.conf | |
<Directory "C:/xampp/htdocs/apps/public"> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride All | |
Require all granted | |
</Directory> | |
Alias "/apps" "C:/xampp/htdocs/apps/public" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Your common configuration | |
#bellow of your common configuration add this code | |
RewriteCond %{HTTPS} off | |
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Developing web app using vagrant is awesome. It make us ease to switch between one environtment to other. | |
But sometimes there are strange thing.In my case, I develope web application using laravel in | |
vagrant environtment (xenial ubuntu server and nginx). In half of development i found something strange. | |
My javascripts file didn't update directly when I change and there is special characters at the end of javascript. | |
After googling for hours, I got the solution. | |
Here is the solution. | |
1. Find nginx configuration /etc/nginx/nginx.conf | |
2. Open the file nginx.conf and find 'sendfile on' configuration, change it to sendfile off; | |
Find the screeenshoot on comment part. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#The are a lot of methods to separate configuration of laravel in nginx. It is only one of them but not the best. | |
#Configuration for removing public and index in laravel or lumen that run on nginX | |
#This configuration implemented in ubuntu server | |
#We can copy this code directly to "/etc/nginx/site-enabled/default" | |
#or you can separate this file, to reduce complexity / large code in file "/etc/nginx/site-enabled/default" | |
#directory name | |
location /dir { | |
#we point the alias to the lavel public directory |