Skip to content

Commit

Permalink
Vps Debian 11
Browse files Browse the repository at this point in the history
Konfiguracja serwera VPS Debian 11 z ovh (de) LEMP, SMTP, SSH, UFW, FAIL2BAN, SSL.
  • Loading branch information
atomjoy authored Jan 24, 2023
1 parent 8422aea commit f7d4d39
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ v=spf1 a mx ip4:1.2.3.4 include:mx.ovh.com -all
hello.example.com
```

### Zaloguj się jako root
Uruchom wszystkie skrypty jako użytkownik root.
```sh
su root
```

### Konfiguracja vps

Zmień parametry przed uruchomieniem.
Expand Down Expand Up @@ -56,4 +62,4 @@ sudo bash sudo-remove.sh

```sh
sudo bash sudo-add.sh
```
```
7 changes: 5 additions & 2 deletions vhost-hello.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ server {
default_type "text/plain";
try_files \$uri =404;
}
# Redirect ssl
return 301 https://${TO_HOST}\$request_uri;
location / {
# Redirect ssl
return 301 https://${TO_HOST}\$request_uri;
}
}
" > "/etc/nginx/sites-enabled/${DOMAIN}.conf"

Expand Down Expand Up @@ -136,6 +138,7 @@ sudo mkdir -p "/var/www/${DOMAIN}$ROOT_DIR/.well-known/acme-challenge"
# Add index page
echo "Html Works ..." > "/var/www/${DOMAIN}$ROOT_DIR/index.html"
echo "<?php echo 'Php Works ...';" > "/var/www/${DOMAIN}$ROOT_DIR/index.php"
echo "Webroot certs ..." > "/var/www/${DOMAIN}$ROOT_DIR/.well-known/acme-challenge/index.html"

if [ "$DISALLOW_ROBOTS" = true ]; then
echo "User-agent: *
Expand Down
7 changes: 5 additions & 2 deletions vhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ server {
default_type "text/plain";
try_files \$uri =404;
}
# Redirect ssl
return 301 https://${TO_HOST}\$request_uri;
location / {
# Redirect ssl
return 301 https://${TO_HOST}\$request_uri;
}
}
" > "/etc/nginx/sites-enabled/${DOMAIN}.conf"

Expand Down Expand Up @@ -136,6 +138,7 @@ sudo mkdir -p "/var/www/${DOMAIN}$ROOT_DIR/.well-known/acme-challenge"
# Add index page
echo "Html Works ..." > "/var/www/${DOMAIN}$ROOT_DIR/index.html"
echo "<?php echo 'Php Works ...';" > "/var/www/${DOMAIN}$ROOT_DIR/index.php"
echo "Webroot certs ..." > "/var/www/${DOMAIN}$ROOT_DIR/.well-known/acme-challenge/index.html"

if [ "$DISALLOW_ROBOTS" = true ]; then
echo "User-agent: *
Expand Down

0 comments on commit f7d4d39

Please sign in to comment.