-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #251 from clue-labs/configs
Update nginx + Apache configuration files to prevent access to internal files
- Loading branch information
Showing
7 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
server { | ||
# Proxy all requests to Framework X | ||
location / { | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header Host $host; | ||
proxy_set_header Connection ""; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
server { | ||
# Serve static files from `public/`, proxy dynamic requests to Framework X | ||
location / { | ||
location ~* \.php$ { | ||
try_files /dev/null @x; | ||
} | ||
root /home/framework-x/public; | ||
try_files $uri @x; | ||
} | ||
|
||
location @x { | ||
proxy_pass http://localhost:8080; | ||
proxy_set_header Host $host; | ||
proxy_set_header Connection ""; | ||
} | ||
|
||
# Optional: handle Apache config with Framework X if it exists in `public/` | ||
location ~ \.htaccess$ { | ||
try_files /dev/null @x; | ||
} | ||
} |
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