Monthly Archives: November 2016

วิธีแก้ ไข .htaccess ไม่ทำงาน .htaccess Is Not working in Linux(Ubuntu) Apache2

login Server  root

nano /etc/apache2/apache2.conf

 

From:

<Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

TO:

<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
</Directory>
and
<Directory />
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
</Directory>


ok  save file   

sudo   /etc/init.d/apache2 restart


ok  wokrk

Its working. It’s enabled use of .htaccess files.

Certificate Installation: Apache & mod_ssl

Installing your Certificate on Apache with mod_ssl

  1. Extract all of the contents of the ZIP file that was sent to you and copy/move them to your server. The extracted contents will typically be named: yourDomainName.crt and yourDomainName.ca-bundle
    Move all of the certificate related files to their appropriate directories.

    A typical setup:

    1. Move the Private Key that was generated earlier to the ssl.key directory, which is typically found in /etc/ssl/. This must be a directory which only Apache can access.
  1. Move the yourDomainName.crt and yourDomainName.ca-bundle to the ssl.crt directory, which is typically found in the /etc/ssl/ directory.

Continue reading

Converting a SSL certificate in Apache to Windows

Converting a SSL certificate in Apache to Windows

class=”kbcontents” colspan=”2″>If you have multiple servers that need to use the same SSL certificate, such as in a load-balancer environment or using a wildcard or UC SSL certificates, you can convert the certificates and private key to a .pfx file and then import the certificate on Windows server so it can be used in IIS or Exchange. This may also be necessary when you switch hosting companies. We will be going over the exact process with step-by-step instructions in this article. If necessary, you can copy the SSL certificate from a Windows server to an Apache server instead.

We will assume that you have already successfully installed the SSL certificate on the Apache web server. You will follow these steps to move or copy that working certificate to the Windows server:

  1. Convert the individual certificate files and private key to a .pfx file.
  2. Copy the .pfx file to the Windows server.
  3. Import the .pfx file to the Windows store.
  4. Configure your IIS web sites to use the certificate.

Continue reading

วิธี Generate Private Key และ CSR บน Linux Apache 2048 linux command

  1. Login เข้าเครื่องโดยใช้สิทธิ์ root
  2. เริ่มต้นโดยทำการ Generate Private Key ด้วยการพิมพ์คำสั่งต่อไปนี้

openssl genrsa -out /etc/httpd/ssl/privatekey.key 2048

หมายเหตุ  /etc/httpd/ssl/   คื่อที่เก็บ  file   privatekey.key 2048

  1. ทำการ Generate CSR จากไฟล์ Key ที่ทำการ Gen ไว้ก่อนหน้านี้โดยพิมพ์คำสั่ง

openssl req -new -key /etc/httpd/ssl/privatekey.key -out /root/Desktop/request.csr

หมายเหตุ  out /root/Desktop/request.csr  คือที่เก็บ  file equest.csr

Continue reading