teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

5

初心者マークの追加

2018/07/19 01:12

投稿

sekkati
sekkati

スコア24

title CHANGED
File without changes
body CHANGED
File without changes

4

httpd.confの追記

2018/07/19 01:11

投稿

sekkati
sekkati

スコア24

title CHANGED
File without changes
body CHANGED
@@ -67,6 +67,21 @@
67
67
  }
68
68
  ```
69
69
 
70
+ /etc/httpd/conf/httpd.confは下記のようになっています。(名前等変えています) & (:8090だけ抜粋)
71
+
72
+ ```apache
73
+ <VirtualHost *:8090>
74
+ ServerName localhost
75
+ DocumentRoot "/opt/abcd/www.defg"
76
+ ErrorLog "logs/error_abcd.log"
77
+ CustomLog "logs/com-accsess.log" common
78
+ <Directory "/opt/abcd/www.defg">
79
+ Allow Override All
80
+ Allow from all
81
+ </Directory>
82
+ </VirtualHost>
83
+ ```
84
+
70
85
  ### 補足情報(FW/ツールのバージョンなど)
71
86
 
72
87
  フレームワーク:MVVMフレームワーク(フレームワークもどきと呼ばれてました)

3

前提の追記⑥

2018/07/18 05:40

投稿

sekkati
sekkati

スコア24

title CHANGED
File without changes
body CHANGED
@@ -12,6 +12,7 @@
12
12
  # yum list installed | grep mod_ssl
13
13
  mod_ssl.x86_64 1:2.2.15-69.el6.cento
14
14
  ```
15
+ ⑥apache側のアプリケーションには特定のネット(ポケットwi-fi)からしかアクセスできないみたいです。
15
16
 
16
17
  実現したいこと:
17
18
  ①apacheで動くシステムはssl化されておらず、ssl化されたnginxをリバースプロキシとしたいです。

2

捕捉情報の追記

2018/07/18 05:19

投稿

sekkati
sekkati

スコア24

title CHANGED
File without changes
body CHANGED
@@ -84,4 +84,11 @@
84
84
  PHP 5.6.13 (cli) (built: Sep 3 2015 14:19:17)
85
85
  Copyright (c) 1997-2015 The PHP Group
86
86
  Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
87
+
88
+ $ php-fpm -v
89
+ PHP 5.6.36 (fpm-fcgi) (built: Apr 25 2018 10:12:10)
90
+ Copyright (c) 1997-2016 The PHP Group
91
+ Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
87
- ```
92
+ ```
93
+
94
+ ※上記のphpとphp-fpmの具体的な違いもわかっていないです。

1

default.confの追記

2018/07/18 04:50

投稿

sekkati
sekkati

スコア24

title CHANGED
File without changes
body CHANGED
@@ -24,9 +24,15 @@
24
24
  /etc/nginx/conf.d/default.confは下記のようになっています。
25
25
 
26
26
  ```nginx
27
+ ### httpでアクセスしてきた場合はhttpsにリダイレクト
27
28
  server {
28
- # listen 80;
29
+ listen 80;
30
+ server_name localhost;
31
+ return 301 https://$host$request_uri;
32
+ }
29
33
 
34
+ ### https設定
35
+ server {
30
36
  ## 追加7/13
31
37
  listen 443 ssl;
32
38
 
@@ -38,12 +44,15 @@
38
44
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
39
45
  ssl_ciphers HIGH:!aNULL:!MD5;
40
46
 
41
- #charset koi8-r;
47
+ ## 編集7/18
42
- #access_log /var/log/nginx/host.access.log main;
43
-
44
48
  location / {
45
- root /usr/share/nginx/html;
49
+ proxy_pass http://192.168.100.110:8090;
50
+ # proxy_redirect off;
51
+ # proxy_set_header Host $host;
52
+ # proxy_set_header X-Real-IP $remote_addr;
46
- index index.html index.htm;
53
+ # proxy_set_header X-Forwarded-Host $host;
54
+ # proxy_set_header X-Forwarded-Server $host;
55
+ # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47
56
  }
48
57
 
49
58
  #error_page 404 /404.html;
@@ -54,29 +63,6 @@
54
63
  location = /50x.html {
55
64
  root /usr/share/nginx/html;
56
65
  }
57
-
58
- # proxy the PHP scripts to Apache listening on 127.0.0.1:80
59
- #
60
- #location ~ .php$ {
61
- # proxy_pass http://127.0.0.1;
62
- #}
63
-
64
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
65
- #
66
- #location ~ .php$ {
67
- # root html;
68
- # fastcgi_pass 127.0.0.1:9000;
69
- # fastcgi_index index.php;
70
- # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
71
- # include fastcgi_params;
72
- #}
73
-
74
- # deny access to .htaccess files, if Apache's document root
75
- # concurs with nginx's one
76
- #
77
- #location ~ /.ht {
78
- # deny all;
79
- #}
80
66
  }
81
67
  ```
82
68