ข้ามไปที่เนื้อหาหลัก

บทความ

กำลังแสดงโพสต์ที่มีป้ายกำกับ Apache

apache set DNS

1. จับตาดู web05 ให้ดีนะเธอว์ /etc/apache2/apache2.conf ServerRoot "/etc/apache2" ServerName web05:80 # or localhost:80 ServerName web1:80 ServerName web07:80 2. $ cd /etc/apache2/sites-available $ sudo cp default web05 $ sudo vim web05 # or localhost NameVirtualHost web05:80 # or localhost:80 NameVIrtualHost web05:443 <VirtualHost web05:80> # or localhost:80 ServerAdmin webmaster@localhost DocumentRoot /var/www/web05 RailsBaseURI /ror # RailsBaseURI /mybasics <directory> Options FollowSymLinks AllowOverride None </directory> <Directory /var/www/web05> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <directory> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow...

ubuntu ssl apache

1. make a self-signed SSL certificate using openssl $ apt-get install openssl $ openssl req -new -x509 -days 365 -nodes -out server.crt \ -keyout server.key or $ cd /etc/ssl/certs $ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf apache.pem 2. turn on SSL $ a2enmod ssl 4.change the file in add NameVIrtualHost web05:443 .. SSLEngine On SSLCertificateFile /etc/apache2/server.crt SSLCertificateKeyFile /etc/apache2/server.key NameVirtualHost web05:80 NameVIrtualHost web05:443 <virtualhost:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/web05 SSLEngine On SSLCertificateFile /etc/apache2/server.crt SSLCertificateKeyFile /etc/apache2/server.key RailsBaseURI /ror </virtualhost> ref : debianclub

apache tomcat

1. download apache tomcat ผมโหลด ตัว Core : tar.gz นะ 2. extract to folder 3. $ bin/startup.sh แล้วจะเข้าเวปได้จาก http://localhost:8080 5. เข้า tomcat manager 6. มันจะถาม username, password ซึ่งจริงๆต้อง ไปใส่ username, password ในไฟล์ /conf/tomcat-users.xml ก่อน ตามนี้ <tomcat-users> <role rolename="manager"/> <role rolename="admin"/> <user username="dsin" password="somepassword" roles="manager,admin"/> </tomcat-users> แล้ว restart tomcat ทีนึง >> ถ้า start webapp บางตัวไม่ติด ให้ไปดูไฟล์ log/catalina.out หรือ $ tail -f log/catalina.out ก็ได้ >> ถ้าอยากเปลี่ยน port ที่รัน tomcat แก้ใน conf/server.xml <Connector port="8088" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/> อยากเปลี่ยน version ของ tomcat แก้ใน etc/default/tomcat7 JAVA_HOME=/usr/lib/jvm/java-7-oracle วิธี deploy webapp ( เขียน ap...