Skip to content

Instantly share code, notes, and snippets.

@WatheqAlshowaiter
Created April 1, 2020 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WatheqAlshowaiter/5fe606f0b4b7b4b1e620335d1551619e to your computer and use it in GitHub Desktop.
Save WatheqAlshowaiter/5fe606f0b4b7b4b1e620335d1551619e to your computer and use it in GitHub Desktop.
this is my nginx.conf / valet.conf/ .htaccess / files:
<IfModule mod_rewrite.c>
RewriteEngine On
#Prevent Indexing
Options +FollowSymLinks -Indexes
#Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# nginx configuration by https://winginx.com/en/htaccess
autoindex off;
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php break;
}
}
user "watheq" staff;
worker_processes auto;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 512M;
server_names_hash_bucket_size 128;
ssi on;
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_vary on;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component;
include "/Users/watheq/.config/valet/Nginx/*";
include servers/*;
include valet/valet.conf;
}
server {
listen 127.0.0.1:80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
location /41c270e4-5535-4daa-b23e-c269744c2f45/ {
internal;
alias /;
try_files $uri $uri/;
}
location / {
rewrite ^ "/Users/watheq/.composer/vendor/laravel/valet/server.php" last;
}
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 "/Users/watheq/.config/valet/Log/nginx-error.log";
error_page 404 "/Users/watheq/.composer/vendor/laravel/valet/server.php";
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass "unix:/Users/watheq/.config/valet/valet.sock";
fastcgi_index "/Users/watheq/.composer/vendor/laravel/valet/server.php";
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME "/Users/watheq/.composer/vendor/laravel/valet/server.php";
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment