ubuntu@18:/var/www/landings/data/www/waterstarsaunapart.com/.well-known/acme-challenge$ ls -l
total 4
-rwxrwxrwx 1 root root 13 Jul 4 07:32 test.txt
ubuntu@18:/var/www/landings/data/www/waterstarsaunapart.com/.well-known/acme-challenge$ curl -I http://waterstarsaunapart.com/.well-known/acme-challenge/test.txt
HTTP/1.1 404 Not Found
Server: nginx/1.12.2
Date: Wed, 04 Jul 2018 06:36:11 GMT
Content-Type: text/html
Connection: keep-alive
ubuntu@18:/var/www/landings/data/www/waterstarsaunapart.com/.well-known/acme-challenge$ ping waterstarsaunapart.com
PING waterstarsaunapart.com (18.220.149.253) 56(84) bytes of data.
64 bytes from 18.220.149.253 (18.220.149.253): icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from 18.220.149.253 (18.220.149.253): icmp_seq=2 ttl=64 time=0.036 ms
66.133.109.36 - - [04/Jul/2018:07:13:12 +0100] "GET /.well-known/acme-challenge/-xSx5JtqZM9ESp2VCkhCrKqupqVbeceTAcT3P8fnIxs HTTP/1.1" 404 180 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
66.133.109.36 - - [04/Jul/2018:07:13:56 +0100] "GET /.well-known/acme-challenge/whrh5kO1VnsdW_pou69vOAHAYFFAAMCnVAH0oW-tM7E HTTP/1.1" 404 180 "-" "Mozilla/5.0 (compatible; Let's Encrypt validation server; +https://www.letsencrypt.org)"
2018/07/04 07:13:12 [error] 19956#19956: *5231 openat() "/usr/local/mgr5/www/letsencrypt/-xSx5JtqZM9ESp2VCkhCrKqupqVbeceTAcT3P8fnIxs" failed (2: No such file or directory), client: 66.133.109.36, server: waterstarsaunapart.com, request:$
2018/07/04 07:13:56 [error] 19956#19956: *5241 openat() "/usr/local/mgr5/www/letsencrypt/whrh5kO1VnsdW_pou69vOAHAYFFAAMCnVAH0oW-tM7E" failed (2: No such file or directory), client: 66.133.109.36, server: waterstarsaunapart.com, request:$
server {
server_name waterstarsaunapart.com waterstarsaunapart.net waterstarsaunaparts.com waterstarsaunaparts.net;
charset off;
index index.php index.html;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/waterstarsaunapart.com/*.conf;
access_log /var/www/httpd-logs/waterstarsaunapart.com.access.log;
error_log /var/www/httpd-logs/waterstarsaunapart.com.error.log notice;
ssi on;
set $root_path /var/www/landings/data/www/waterstarsaunapart.com;
root $root_path;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
}
location ^~ /.well-known/acme-challenge {
allow all;
default_type "text/plain";
}
location @fallback {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
access_log off;
}
listen 172.31.36.168:80;
listen 18.220.149.253:80;
}
server {
server_name waterstarsaunapart.com waterstarsaunapart.net waterstarsaunaparts.com waterstarsaunaparts.net;
ssl on;
ssl_certificate "/var/www/httpd-cert/landings/waterstarsaunapart.com_le1.crt";
ssl_certificate_key "/var/www/httpd-cert/landings/waterstarsaunapart.com_le1.key";
ssl_ciphers EECDH:+AES256:-3DES:RSA+AES:!NULL:!RC4;
ssl_prefer_server_ciphers on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_dhparam /etc/ssl/certs/dhparam4096.pem;
charset off;
index index.php index.html;
disable_symlinks if_not_owner from=$root_path;
include /etc/nginx/vhosts-includes/*.conf;
include /etc/nginx/vhosts-resources/waterstarsaunapart.com/*.conf;
access_log /var/www/httpd-logs/waterstarsaunapart.com.access.log;
error_log /var/www/httpd-logs/waterstarsaunapart.com.error.log notice;
ssi on;
set $root_path /var/www/landings/data/www/waterstarsaunapart.com;
root $root_path;
listen 172.31.36.168:443;
listen 18.220.149.253:443;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
}
location ^~ /.well-known/acme-challenge {
allow all;
default_type "text/plain";
}
location @fallback {
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port $server_port;
access_log off;
}
}
set $domain 'example';
if ($arg_q != $domain){
rewrite ^(.*)$ $scheme://$host$1?q=$domain redirect;
break;
}
#if ( $arg_q !~ example) { rewrite ^(.*)$ http://example.com/?q=example? redirect;}
, разве что проверяется точное соответствие, а не содержание. С break`ом или без, результат был един. #if ( $arg_q !~ part) { rewrite ^(.*)$ http://example.com/?q=example? redirect;}
server {
listen 80;
listen 443;
server_name example.com examples.com example.net examples.net;
root /var/www/html/landingpages/lp;
if ( $host !~ example.com){
rewrite ^(.*)$ https://example.com/? redirect;
break;
}
#===============================SSL
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
#==================================
location ~* \.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|xml|docx|xlsx)$ {
root /var/www/html/landingpages/lp;
index index.html index.php;
access_log off;
expires 30d;
proxy_cache_valid 404 1m;
}
#==============================
location @drupal{
include fastcgi_params;
fastcgi_param QUERY_STRING q=$uri&$args;
fastcgi_param SCRIPT_NAME /index.php;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(txt|log)$ {
allow 192.168.0.0/16;
deny all;
}
location ~ \..*/.*\.php$ {
return 403;
}
location ~ ^/sites/.*/private/ {
return 403;
}
location ~* ^/.well-known/ {
allow all;
}
location ~ (^|/)\. {
return 403;
}
#=============================
location / {
try_files $uri /index.php?$query_string; # For Drupal >= 7
index index.php index.html index.htm;
}
#=============================
location @rewrite {
# rewrite ^/(.*)$ /index.php?q=$1;
# rewrite ^/(.*)$ /index.php?q=precisiontherapysauna.com;
}
location ~ /vendor/.*\.php$ {
deny all;
return 404;
}
location ~ '\.php$|^/update.php' {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
include fastcgi_params;
fastcgi_param HTTP_PROXY "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
location ~ ^/sites/.*/files/styles/ { # For Drupal >= 7
try_files $uri @rewrite;
}
location ~ ^(/[a-z\-]+)?/system/files/ { # For Drupal >= 7
try_files $uri /index.php?$query_string;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
}
rewrite ^(.*)$ http://example.com/?q=example? redirect;
#if ( $arg_q !~ part) { rewrite ^(.*)$ http://example.com/?q=example? redirect;}
#if ( $query_string !~ example ) {rewrite ^(.*)$ http://example.com/?q=example? redirect;}
приводили к вышеописанным проблемам.
https://aws.amazon.com/ru/premiumsupport/knowledge...
Я знаю, что мне нужны белые адреса. И именно их я и получаю. Вы, похоже, никогда не работали с aws.amazon и их механикой elactic IP? Каждому адресу типа "172.31.22.168" сопоставлен соответствующий белый адрес. Полностью весь их роутинг мне абсолютно непрозрачен.
Для восьми IP-адресов мой конфиг работает, мне кажется, я вполне доступно это описал. То есть, еще раз:
два сетевых интерфейса, 8 серых адресов, 8 белых адресов, сопоставленных амазоном с серыми, которые прописываю я. С этих 8 адресов я могу выходить в мир, эти 8 адресов пингуются из мира. Добавляю третий сетевой интерфейс с аналогичным конфигом - и он не имеет выхода наружу, хотя внутри сети амазона все это пингуется прекрасно.
Нет, не накрутка (не слив). Для накрутки или слива городить такой огород нет смысла. Нет, прокси или впн не вариант.
Ruslan-Strannik а вам это зачем? Пингуется по всем четырем белым адресам, сопоставленным серым адресам, которые можно увидеть в приведенном выводе Ip addr.