Home  >  Article  >  Backend Development  >  Use wamp to configure a virtual host on winserver2008 and access it with an external domain name_PHP tutorial

Use wamp to configure a virtual host on winserver2008 and access it with an external domain name_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:14:09753browse

Winserver2008 is full of troubles. When configuring wamp 2.2e on winserver, it fails to run and crashApp error is reported.

I have been working on it for a long time but still can’t solve it. Can anyone give me some advice? Later I downloaded wamp 2a and it can be installed, but its PHP version is

5.2, I need to upgrade the PHP version later, at least to 5.3!

The specific installation failure and PHP version upgrade issues will be written in the next article. Here I will write about the configuration issues of apache and server.

First: resolve the domain name to the external IP of the server. As for how to resolve it. . Check it out yourself, I won’t say more!

Secondly: Find #Include conf/extra/httpd-vhosts.conf and remove the # sign in front of it

As a result, APACHE cannot be started after restarting it. Why?

I deleted all the contents in httpd-vhosts.conf and restarted without any problem. I suspect something in the httpd-vhosts.conf file is wrong.

I really don’t know the details, so I will bring the 2 I brought with me

 
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "c:/Apache2/docs/dummy-host.example.com"
ServerName dummy-host .example.com
ServerAlias ​​www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com -access.log" common
 

Delete all these things and check them using

  ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
🎜> 


Attention

The following paragraph is used to configure the domain name and path

ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/www/yl/"
ServerName www.1y.com.cn
ErrorLog "logs/dummy-host2.example. com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common

The following paragraph is to grant permissions to the website folder. If you do not add this sentence, a 400 error will occur when accessing

 

      Options Indexes FollowSymLinks

      AllowOverride None
     Order allow,deny
    Allow from all

It’s no problem to re-WAMP after saving.

Of course, don’t forget to change the host file to point to


 127.0.0.1 Your domain name

Then access the configured domain name on the server to access the website.

So how to access the external network?

If the external domain name is resolved, it can be accessed. Of course, when I start accessing, it prompts that the connection cannot be made!

I thought it must be a problem with the external IP address, so I turned off the firewall that comes with win2008, and then accessed it from the outside,

It must be that the firewall has restricted the entry rules for port 80.

Then open the firewall-"Advanced rules-"New rule-"Give a name, and then select the port,

Next step -> Enter 80, then the next step, and then the name and so on. The creation is completed. Open the firewall,

Access from the outside again, OK!

Okay, the technical level of this article is approximately 0, but sometimes it can be reused, so MARK it.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440308.htmlTechArticlewinserver2008 is a lot of trouble. I configured wamp 2.2e on winserver and it can’t run. It reports a crashApp error. It’s done. I haven't solved it for a long time. Can anyone give me some guidance? Then I downloaded wam...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn