Apacheとnginxが共存しているレンタルサーバーが多いわけ!。

2022.02.20

Logging

おはよう御座います。
今日はお天気だけど少し寒さがある朝でした。

Apachenginxが共存しているレンタルサーバーはあると思います。

Nginx Tutorial | Learn Nginx Fundamentals | Deploy a Web Application Using Nginx | Edureka

何故🤔そうなのか、答えは簡単。昔のレンタルサーバーはApacheが本流でした。なので、.htaccessにコンフィグ設定を書いていました。そして今日、Nginxが本流になりましてお客様のコンフィグ設定があるが為、ApacheとNginxを共存しなくてはならなく成り、NginxとApacheが共存していると言うことです。

技術的な仕組み(ApacheとNginxの共存方法)を社長兼エンジニアに聞いたところ、リバースプロキシサーバーで動かしているそうです。なるほど~って長年の疑問がスッと消えた瞬間でした👍。

因みにこの頃、自分もnginxを使用するようになりましたが、config(コンフィグ)の書き方が全然違うので未だにググりながら設定してます。設定の仕方は違うけどApacheもnginxも考え方は同じなので慣れれば何とかなると思います。慣れたのでApacheに戻りました😁。

  	server {
	    	listen 443 ssl;
	    	server_name example.com;
		root /var/html/example.com;
		ssl on;
		ssl_certificate /etc/letsencrypt/example.com/fullchain.pem;
		ssl_certificate_key /etc/letsencrypt/example.com/privkey.pem;

		location /tool/sample-x/ {
			index index.php index.html;
			if (!-f $request_filename){
				rewrite ^(.*)$ /tool/sample-x/index.php;
			}
		}
	}

タグ

$request_filename, Apache, config, example.com, fullchain.pem, htaccess, index.php, letsencrypt, location, nginx, Rewrite, root, sample-x, SERVER, ssl_certificate, tool, コンフィグ, リバースプロキシサーバー, 本流,

Let’s Encrypt の無償のSSLメモ!!

2017.09.30

Logging


Let’s Encrypt の無償のSSLメモ!!自分用
SSL認証導入のメモです。分かる人にはわかる。メモしてくださいφ(..)メモメモ。
ちなみにオレオレ認証の方法を以前、掲載していたと思いますが、Chrome58以降
あの方法では駄目みたいです、オレオレ認証できないなどと検索すると対処法が
書かれていますが、まだ検証していませんがたぶん、あの方法でうまくいくかもしれない。
ちなみに緩いブラウザではオレオレ認証を通すことは可能かと思います。
例えばローカルサーバでオレオレ認証が必要な場合などはブラウザを限定してあげることで
対応することも可能です。ChromeはSSLを結構厳しく見ている・・・?
正直な所、ローカルサーバでSSLが必要なこともあるので、開発者用ではゆるく見ることのできる
設定をオプションで持たせることぐらい出来たはずではと思ってしまいます。
トイウコトでzip358.siteをSSL化しましたよ。

yum install epel-release
yum install certbot python-certbot-apache
certbot certonly --webroot -w /home/www/zip358.site/ -d zip358.site
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): メールアドレスを入力
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf. You must agree
in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: N
    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/zip358.site/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/zip358.site/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/zip358.site/chain.pem
firewall-cmd --add-service=https --zone=public --permanent
firewall-cmd --reload
crontab -u xxxx -e
0 5 1 * * certbot renew
systemctl restart httpd

タグ

a founding partner of the Let's Encrypt, certbot certonly, certbot renew, Enter email address, firewall-cmd, in order to register with the ACME, letsencrypt, organization that develops Certbot, our work to encrypt the web, Please read the Terms of Service, protect its users and defend digital rights, Saving debug log, systemctl restart httpd, used for urgent renewal and security notices, We'd like to send you email about, Would you be willing to share your, yum install certbot python-certbot-apache, yum install epel-release, zip358.site,