Share some considerations for deploying the PHP project

  • 2020-11-30 08:11:57
  • OfStack

When deploying an PHP project, there are a few points that need special attention and are easy for beginners to overlook:

1. How to install and configure WAMPServer after downloading it?

2. How to manage the MySQL database via the client?

3. How to access the PHP website via the IP address, if accessing the PHP website on the server within the LAN?

For point 1, note the following:

1. Download WAMPServer, and you can find the address yourself;

2. Install WAMPServer

3. At this time, PHP, Apache and MySQL have been installed. Even http://localhost can be accessed immediately, and the DATABASE of MySQL can also be accessed through phpMyAdmin;

4. If pseudo-static is to be turned on, the following operations need to be done:

Load Rewrite module:

Found in httpd.conf under conf directory


01.LoadModule rewrite_module modules/mod_rewrite.so  

Remove the previous comment #

Allow use of the.htaccess file in any directory. Change "AllowOverride" to "All" (default: "None") :


# AllowOverride controls what directives may be placed in .htaccess files.
# It can be  " All " ,  " None " , or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

For point 2, note the following:

1. Find the user menu through phpMyAdmin and change the MySQL password (the default password is empty)

2. Download Navicat to manage MySQL

For point 3, note the following:

1. IP address access is allowed (only 127.0.0.1 is allowed by default) :

In the Apache configuration file httpd.conf, find the following and comment out the line 1 of Deny from all


#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1


Related articles: