PHP Zend Framework and PHP virtual host configuration

Source: Internet
Author: User
*************************************************************

Zend Framework Configuration ****************************

*************************************************************

httpd.conf
1, cmd for netstat-aon|findstr "80" if occupied, then change the port

#Listen 12.34.56.78:80
Listen 80

>>

#Listen 12.34.56.78:80
Listen 8080

2, # LoadModule Rewrite_module modules/mod_rewrite.so.

Note: The "#" in front of the mod_rewrite is removed
3, all the documents in general appear allowoverride for none. Please make sure none is changed to all. So you write. htaccess such a file will play a role.
4, DocumentRoot "c:/wamp/www" Apache Configuration virtual path

Note: Make sure that the path is correct and that the path exists otherwise Apache cannot start
5. If access should occur at this time, there should be insufficient permissions
So we also need to apply access permissions allowoverride to the specified Apache configuration under the virtual path
  


Ini
Put the library in place and configure the include library in PHP.ini.

; UNIX: "/path1:/path2"; include_path = ".:/ Php/includes ";; Windows: "\path1;\path2" include_path = ".; C:\library "


************************************************************

Apache Virtual Host Configuration ***************************

************************************************************

1 Remove Apache httpd.conf in front of the following two words

LoadModule Vhost_alias_module modules/mod_vhost_alias.so

Include conf/extra/httpd-vhosts.conf

2 Locate the Hosts file under C:\Windows\System32\drivers\etc

Configuration

127.0.0.1 Tools.localhost

127.0.0.1 Website.localhost

3 found the httpd-vhost.conf file under C:\wamp\bin\apache\Apache2.2.11\conf\extra

Configure the following data

Namevirtualhost *:8080## VirtualHost example:# almost any Apache directive could go into a VirtualHost container.# the first  VirtualHost section was used for all requests that does not# match a ServerName or Serveralias in any
 
  
   block.# 
   
    ServerName website.localhost ServerAdmin webmaster@test.tools.directhr.net documentroot "C: \users\n.zhang\documents\website\dhr3 " 
    
     Options Indexes multiviews followsymlinks allowoverride all Order al Low,deny
     allow from all errorlog "Logs/test.tools.directhr.net-error.log" Customlog "logs/test.tools.d    Irecthr.net-access.log "Common
    
   
    ServerName tools.localhost ServerAdmin webmaster@test.tools.directhr.net DocumentRoot "C:\Users\n.zhang\Documents\Tools" 
    
     Options Indexes multiviews followsymlinks allowoverride A ll Order Allow,deny
     allow from all errorlog "Logs/test.tools.directhr.net-error.log" Customlog "logs/ Test.tools.directhr.net-access.log "Common
    
 

  
 


4 Modify the following two configurations of the php.ini (allow uploading of large files)

Post_max_size = 500M

Upload_max_filesize = 500M

5 If Root has a password of 123456, login phpMyAdmin There are several ways
Open the config.inic.php under C:\wamp\apps\phpmyadmin3.2.0.1
"One" uses the config authorization mode, which is also the default way
$cfg [' Servers '] [$i] [' auth_type '] = ' config '; Licensing mode
$cfg [' Servers '] [$i] [' user '] = ' root '; MySQL Tutorial login user
$cfg [' Servers '] [$i] [' password '] = ' 123456 '; MySQL Login user password
$cfg [' Servers '] [$i] [' allownopassword '] = true;

"Two" Use cookie licensing mode, login required
Change ' auth_type ' to ' cookie ' and then modify ' Blowfish_secret ' to use an arbitrary string as the encrypted string of the cookie, and if there is no encryption key, the system will show "the configuration file now requires a secret phrase password (blowfish_ Secret) ", the configuration file is as follows:
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie ';
$cfg [' blowfish_secret '] = ' 44e2f5aece2855.93921574 ';

"Three" login window with HTTP Authorization mode HTTP authorization mode
$cfg [' Servers '] [$i] [' auth_type '] = ' http ';
Note: If the MySQL server uses more than 4.1 version, and the client connection with a mysql4.1 version, the user to set the password attention to the use of the Old_password function, for example:
MySQL > SET PASSWORD = Old_password (' 12345 ')
MySQL >/g
Appendix: (The following is written by oneself) in addition to the above three kinds of phpmyadmin, you can also use the Apache configuration to restrict logins, place a. htaccess file under the phpMyAdmin directory, and specify the password record file to use. Then use HTPASSWD to generate the password stored in the password record file (the contents of the file is encrypted, using the method htpasswd/etc/php_passwd username).
Content in httpd.conf: phpMyAdmin ' s directory > allowoverride authconfig
Contents of the. htaccess file
AuthType Basic AUTHUSERFILE/ETC/PHP_PASSWD authname information require Valid-user
We can see something like this in the/etc/php_passwd file:
Username:2y2cd6nfjuwl6

8

PHP.ini modification

Max_input_time =-1

Max_execution_time =-1

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.