質問編集履歴
2
/etc/httpd/conf/httpd.confの内容を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -54,4 +54,76 @@
|
|
54
54
|
どなたかご教示お願いいたします。
|
55
55
|
|
56
56
|
|
57
|
-
開発環境で$ rails s -e production でサーバーを起動した場合はproductionモードで動いてくれます。
|
57
|
+
開発環境で$ rails s -e production でサーバーを起動した場合はproductionモードで動いてくれます。
|
58
|
+
|
59
|
+
追記
|
60
|
+
Apacheの設定は以下のようにしています。(コメントは削除しました)
|
61
|
+
/etc/httpd/conf/httpd.confの内容です。
|
62
|
+
```ここに言語を入力
|
63
|
+
ServerTokens Prod
|
64
|
+
ServerSignature off
|
65
|
+
|
66
|
+
ServerRoot "/etc/httpd"
|
67
|
+
Listen 80
|
68
|
+
Include conf.modules.d/*.conf
|
69
|
+
User apache
|
70
|
+
Group apache
|
71
|
+
ServerAdmin root@localhost
|
72
|
+
<Directory />
|
73
|
+
AllowOverride none
|
74
|
+
Require all denied
|
75
|
+
</Directory>
|
76
|
+
DocumentRoot "/var/www/html"
|
77
|
+
<Directory "/var/www">
|
78
|
+
AllowOverride None
|
79
|
+
# Allow open access:
|
80
|
+
Require all granted
|
81
|
+
</Directory>
|
82
|
+
<Directory "/var/www/html">
|
83
|
+
Options FollowSymLinks
|
84
|
+
AllowOverride None
|
85
|
+
Require all granted
|
86
|
+
</Directory>
|
87
|
+
<IfModule dir_module>
|
88
|
+
DirectoryIndex index.html
|
89
|
+
</IfModule>
|
90
|
+
<Files ".ht*">
|
91
|
+
Require all denied
|
92
|
+
</Files>
|
93
|
+
ErrorLog "logs/error_log"
|
94
|
+
LogLevel warn
|
95
|
+
|
96
|
+
<IfModule log_config_module>
|
97
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
98
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
99
|
+
<IfModule logio_module>
|
100
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
101
|
+
</IfModule>
|
102
|
+
CustomLog "logs/access_log" combined
|
103
|
+
</IfModule>
|
104
|
+
|
105
|
+
<IfModule alias_module>
|
106
|
+
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
107
|
+
|
108
|
+
</IfModule>
|
109
|
+
<Directory "/var/www/cgi-bin">
|
110
|
+
AllowOverride None
|
111
|
+
Options None
|
112
|
+
Require all granted
|
113
|
+
</Directory>
|
114
|
+
|
115
|
+
<IfModule mime_module>
|
116
|
+
TypesConfig /etc/mime.types
|
117
|
+
AddType application/x-compress .Z
|
118
|
+
AddType application/x-gzip .gz .tgz
|
119
|
+
AddType text/html .shtml
|
120
|
+
AddOutputFilter INCLUDES .shtml
|
121
|
+
</IfModule>
|
122
|
+
ServerTokens Prod
|
123
|
+
ServerSignature off
|
124
|
+
ServerRoot "/etc/httpd"
|
125
|
+
Listen 80
|
126
|
+
Include conf.modules.d/*.conf
|
127
|
+
User apache
|
128
|
+
Group apache
|
129
|
+
```
|
1
seedデータの投入確認を追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -27,6 +27,12 @@
|
|
27
27
|
$ bundle exec rake assets:precompile RAILS_ENV=production
|
28
28
|
|
29
29
|
```
|
30
|
+
seedデータが投入されているか確認
|
31
|
+
```ここに言語を入力
|
32
|
+
$ rails c -e production
|
33
|
+
|
34
|
+
#投入されていることを確認 OK
|
35
|
+
```
|
30
36
|
としたあとRailsサーバーを起動させます。
|
31
37
|
```ここに言語を入力
|
32
38
|
$ rails s -e production
|