15,068
edits
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Nginx Directory Permissions and Symbolic Link Configuration Guide | |||
| Line 19: | Line 19: | ||
# Verify Symbolic Link | # Verify Symbolic Link | ||
< | <pre lang="bash"># Check if symbolic link is correct | ||
ls -l /home/your_user/public_folder</ | ls -l /home/your_user/public_folder</pre> | ||
Expected output: | Expected output: | ||
| Line 52: | Line 52: | ||
}</pre> | }</pre> | ||
<span id="common-issues"></span> | <span id="common-issues"></span> | ||
== Common Issues | == Troubleshooting of Common Issues == | ||
* Specific directories return 404 (files exist) | * Specific directories return 404 (files exist) | ||
| Line 58: | Line 58: | ||
* Nginx error log shows permission issues | * Nginx error log shows permission issues | ||
== Solution: Adjust Permission Settings == | === Solution: Adjust Permission Settings === | ||
# Check Nginx Error Log | # Check Nginx Error Log | ||
| Line 82: | Line 82: | ||
chmod 644 /usr/share/nginx/html/folder/your_file.png</pre> | chmod 644 /usr/share/nginx/html/folder/your_file.png</pre> | ||
<span id="permission-details"></span> | <span id="permission-details"></span> | ||
== Permission Details == | |||
=== Permission Details === | |||
* <code>chmod 755</code> (directories): | * <code>chmod 755</code> (directories): | ||
| Line 93: | Line 94: | ||
** Others: read (r–) | ** Others: read (r–) | ||
== Testing and Verification == | === Testing and Verification === | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
| Line 101: | Line 102: | ||
sudo systemctl reload nginx</pre></li></ol> | sudo systemctl reload nginx</pre></li></ol> | ||
== Important Notes == | === Important Notes === | ||
# Permission changes take effect immediately, no nginx restart needed | # Permission changes take effect immediately, no nginx restart needed | ||