10 thg 12, 2020

Kiểm tra responsive của website trên các thiết bị mobile và desktop với Browserstack

 

BrowserStack is a cloud web and mobile testing platform that provides developers the ability to test their websites and mobile applications across on-demand browsers, operating systems and real mobile devices. They have four primary products- Live, App Live, Automate and App Automate

 

28 thg 3, 2020

Use OpenLitespeed to create a WordPress development environment on MacOSX



In the previous post, I have post how to install OpenLitespeed on MacOSX. In this post, I will show you how to install WordPress on MacOSX use OpenLitespeed as WebServer.

WordPress requirements

The requirements of WordPress are defined on WordPress's official page. I will be following it and summarize the below requirements.


PHP: PHP 5.6.20+
MySQL: MySQL 5.0+ or MariaDB 10.1+
Webserver: Apache or NGINX. But we use OpenLitespeed
HTTPS support: It's recommended

Let's start.

All the software used to make the WordPress environment will be installed via the HomeBrew package manager. So please install it before.

First, please install OpenLitespeed on your Mac if it's not installed before.


Install MySQL:

brew install mysql@5.7

After install the MySQL you can configure MySQL root password via command
mysql_secure_installation

Enter password for user root: 
Change the password for root ?
y
New password:
root
Re-enter new password:
root

Remove anonymous users? (Press y|Y for Yes, any other key for No) :
y

Disallow root login remotely? (Press y|Y for Yes, any other key for No) :
y

Remove test database and access to it? (Press y|Y for Yes, any other key for No) :
y

Reload privilege tables now? (Press y|Y for Yes, any other key for No) :
y

Install PHP


Default brew tap puleeno/openlitespeed install LSPHP 7.3 to create PHP environment for OpenLitespeed. So we can use it for WordPress.

Install WordPress


Download WordPress source via WordPress.org and extract it to any your path you want.

I will store it in ~/WordPress. Full path is /Users/puleeno/WordPress/demo


Open OpenLitespeed Admin Dashboard via URL https://localhost:7080/

Please input your credentials to login to dashboard.


Default credentials info is

ID: admin
PW: 123456


In Left Sidebar. Click on Virtual Host to go to the Virtual Host page.

On page Virtual Hosts page. Click to Example virtual host


At Virtual Host Root, change the value to ~/WordPress and click save button.

Click restart OpenLitespeed server to finish.


To check your result, You can go to URL http://localhost/demo. If you see WordPress install page, we have successful.

Now, you can set up WordPress to develop local.


In the next post, I will show you how to create a custom virtual host to customize domain to use http://yourdomain.com to replace http://localhost.



14 thg 3, 2020

How to install OpenLitespeed on MacOSX

What is OpenLitespeed?

OpenLiteSpeed is the Open Source edition of LiteSpeed Web Server Enterprise.
Both servers are actively developed and maintained by the same team, and are held to the same high-quality coding standard.
OpenLiteSpeed contains all of the essential features found in LiteSpeed Enterprise, and represents our commitment to support the Open Source community.
    https://openlitespeed.org/

How to install OpenLitespeed for MacOSX

You can install from source in Openlitespeed Official Document to install OpenLitespeed for Mac. But It so difficult for basic users. So I have created a HomeBrew package to install OpenLiteSpeed on MacOSX. Please follow the below install steps.

Install HomeBrew.

Please instal HomeBrew via https://brew.sh/. This is a package manager for Mac.
You can install many packages (software, library) for Mac via Terminal.

Install OpenLitespeed

Open Terminal and enter below command

brew tap puleeno/openlitespeed
brew install openlitespeed

Install LSPHP SAPI

If you a Litespeed user as you know Litespeed run PHP via an LSPHP API. It's not php_mod in Apache or PHP FPM in NGINX. 
Default this brew package install PHP 7.3 to run OpenLitespeed but you can install other PHP versions.
brew install lsphp

E.g:

brew install lsphp74

brew install lsphp56

Start OpenLitespeed

You can run OpenLitespeed directly or via MacOSX service via HomeBrew.

To run directly please enter the command

lswsctrl start

Run OpenLitespeed as service

brew services start openlitespeed

Request Features or Report Bugs

You have a idea for package OpenLitespeed or want to report the bug(s) of package. Please submit it  via GitHub issues.

What're next posts

In the next posts, I will show to you how to configurations OpenLitespeed and install WordPress on OpenLitespeed server.

Bye! and see you next post ;)