EC2にTomcatをインストールする.
# EC2にTomcatをインストールする.
$ sudo yum -y install java-1.7.0-openjdk-devel
$ sudo yum install tomcat7 tomcat7-webapps
$ sudo service tomcat7 start
$ sudo chkconfig tomcat7 on
$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
$ sudo vi /etc/tomcat7/server.xml
++ proxyPort="80"
$ sudo service tomcat7 restart
テスト環境にアクセス出来ない時,IP制限がかかっていないか確認する.
# テスト環境にアクセス出来ない時,IP制限がかかっていないか確認する.
(制限をかけたのは自分...)
Starting httpd: (98)Address already in useというエラーが出たので対応した.
# Starting httpd: (98)Address already in useというエラーが出たので対応した.
$ sudo service httpd restart
> Starting httpd: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
> (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
> no listening sockets available, shutting down
> AH00015: Unable to open logs
$ sudo netstat -peanut | grep ":80"
> tcp 0 0 :::80 :::* LISTEN 0 11792 3661/httpd
$ sudo kill -9 3661
$ sudo service httpd restart
> Stopping httpd: [FAILED]
> Starting httpd: [ OK ]
.htaccessでのリダイレクトができないので,PHPファイルで対応した.
# .htaccessでのリダイレクトができないので,PHPファイルで対応した.
$ vi public/index.php
++ header( "HTTP/1.1 301 Moved Permanently" );
++ header('Location: https://XXX.com');
++ exit;
fonts.confのエラーが出たので対応した.
# fonts.confのエラーが出たので対応した.
> Fontconfig warning: "/usr/local/etc/fonts/fonts.conf", line 146: blank doesn't take any effect anymore. please remove it from your fonts.conf
$ vi /usr/local/etc/fonts/fonts.conf
-- < blank >
-- < /blank >