fix pages

This commit is contained in:
night0721 2023-11-12 01:28:58 +00:00
parent 93a3656ae8
commit bcf50c30b8
3 changed files with 26 additions and 21 deletions

View file

@ -158,12 +158,11 @@ a:visited, a:link {
/* Blog elements */ /* Blog elements */
:not(pre)>code { code {
font-family: var(--font-family); font-size: 0.8rem;
font-size: 1rem; font-weight: 500;
color: var(--color-text);
font-weight: bold;
overflow-wrap: break-word; overflow-wrap: break-word;
overflow-x: scroll;
} }
/* Additional elements */ /* Additional elements */

View file

@ -33,7 +33,7 @@ Mostly same as JPGs
# Optimise batch of files at a time # Optimise batch of files at a time
``` ```sh
mogrify -sampling-factor 4:2:0 -strip -quality 75 -interlace JPEG -colorspace sRGB -resize 400 -path "opt" *.jpg # converting all jpgs and put all converted jpgs into opt folder mogrify -sampling-factor 4:2:0 -strip -quality 75 -interlace JPEG -colorspace sRGB -resize 400 -path "opt" *.jpg # converting all jpgs and put all converted jpgs into opt folder
``` ```

View file

@ -4,20 +4,26 @@ date: 2023-11-11T01:30:00+00:00
--- ---
1. Point A and AAAA records to VPS ipv4 and ipv6 1. Point A and AAAA records to VPS ipv4 and ipv6
Move public ssh key to .ssh/authorized_keys 2. Move public ssh key to .ssh/authorized_keys
2. pacman-S nginx certbot-nginx 3. Download dependencies and open ports for nginx, also enable nginx
Allow port 80, 443 ```sh
systemctl start nginx pacman-S nginx certbot-nginx
3. Create according files according to nginx configuration sudo ufw allow 80
Create cert using certbot —nginx sudo ufw allow 443
Generate .htpasswd using htpasswd command with sudo sudo systemctl enable nginx --now
Edit nginx configuration
Create two folders at /etc/nginx
sites-available and sites-enabled
``` ```
4. Create according files according to nginx configuration below
5. Create cert using `certbot —nginx`
6. Generate .htpasswd using `htpasswd` command
7. Create two folders at `/etc/nginx`, `sites-available` and `sites-enabled`
`
```conf
#sites-available/tty #sites-available/tty
# run this line to enable the site by linking available sites to enabled sites
# ln -sf sites-available/tty sites-enabled/tty # ln -sf sites-available/tty sites-enabled/tty
server { server {
server_name ng.night0721.xyz ; server_name ng.night0721.xyz ;
location / { location / {
@ -30,10 +36,10 @@ server {
root /etc/nginx/files root /etc/nginx/files
autoindex on; autoindex on;
auth_basic "Restricted Access"; auth_basic "Restricted Access";
auth_basic_user_file /etc/nginx/.htpasswd; auth_basic_user_file /etc/nginx/.htpasswd; # make sure you got the right path
} }
location /discord { location /discord { # proxy
proxy_pass https://discord.com/; proxy_pass https://discord.com/;
proxy_set_header Host discord.com; proxy_set_header Host discord.com;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
@ -91,4 +97,4 @@ http {
} }
``` ```
Useful video for setting up nginx: https://youtu.be/ugWydr_QdIY?si=vgyS-l6yWsqlSHZC Useful video for setting up nginx by [BugsWriter](https://youtu.be/ugWydr_QdIY?si=vgyS-l6yWsqlSHZC)