NGINX’s default 403 page isn’t very pretty. In this video, learn how to add a custom 403 page.
- [Narrator] Along with using the allow and deny directives,…we can add a custom 403 page.…So even though we might be denying…somebody from viewing a page,…we can still give them something pretty to look at.…First let's create a location that's always denied,…so we can see the default page generated by Nginex.…So let's edit our vhost configuration file.…I'll add a location called /deny…and use the deny all directive.…
Now let's save this and test it out.…And I'll use nginx-t to test the configuration…and reload it with systemctl reload nginx.…Now let's open the browser and try out deny location.…Okay so we see the 403 Forbidden page generated by Nginex.…Let's create a custom 403 page so we don't see…this default page, and create something…that's a little bit more in line with our site.…
Let's edit our vhost configuration file.…You might recall that we already have a configuration…for handling 404 errors.…Let's use that code over again for our 403 errors.…And what I'll do is just replace…the 404s in this section with 403.…
Author
Released
8/22/2018- Installing NGINX on Linux
- Configuring a virtual host
- Installing PHP and MariaDB for the LEMP stack
- Securing sites with NGINX
- Creating SSL certificates
- Reverse proxies
- Load balancing
Skill Level Intermediate
Duration
Views
Related Courses
-
Apache Web Server: Administration
with Jon Peck58m 3s Advanced -
DevOps Foundations: Infrastructure as Code
with Ernest Mueller2h 6m Intermediate
-
Introduction
-
What is NGINX?30s
-
Comparing NGINX to Apache4m 45s
-
Create a VM with Vagrant3m 6s
-
-
1. Install and Configure NGINX
-
Install NGINX on Ubuntu3m 13s
-
NGINX files and directories2m 39s
-
Inside nginx.conf2m 51s
-
Configure locations5m 58s
-
Configure logs3m 52s
-
Troubleshoot NGINX3m 14s
-
-
2. The Linux, NGINX, MySQL, and PHP Stack
-
The LEMP stack1m 4s
-
Install PHP on NGINX5m 37s
-
Install MariaDB on NGINX5m 25s
-
LEMP stack demonstration6m 25s
-
-
3. NGINX Security
-
Secure sites with NGINX1m 21s
-
Create a 403 page3m 3s
-
Configure HTTPS1m 37s
-
Create an SSL certificate3m 57s
-
-
4. Reverse Proxies and Load Balancers
-
Conclusion
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create a 403 page