Use a peanut shell to configure your site: Apache (PHP) multi-port configuration, remote logon, SVN, FTP, etc.

Source: Internet
Author: User

The peanut shell is a dynamic domain name resolution software that can be used to set up a local server for itself, can be used as its own version library or remote control of the home computer in the company, in short, it is quite useful.

Peanut shells

There is not much nonsense. The first step is to install the peanut shell. Please download and install it by yourself. I will not say much about it. Remember to register a free second-level domain name or bind your own domain name, after the installation is complete, the following screen is displayed:

Obviously, the domain name we apply for is zhangyue0503.gicp.net. Currently, the IP address of the computer is 123.114.214.17. In this way, the installation of the peanut shell is complete.

Server Configuration

Next, configure PHP and install a Wamp. Remember to close IIS and configure its port information and virtual directory:

1. your installation directory: \ bin \ apache \ apache2.2.11 \ conf \ httpd. conf, open it with notepad or your favorite tool, and look for listen 80. This is Apache listening to port 80. You can change it so that Apache does not listen to port 80, in this way, it will not conflict with the default website port of IIS, or add listeners with other ports, such as "Listen 8081" and "Listen 8082; next we look for include CONF/extra/httpd-vhosts.conf, remove the # above, introduce the virtual directory configuration file.


2. open your installation directory: \ bin \ apache \ apache2.2.11 \ conf \ extra \ httpd-vhosts.conf, comment out the default information (add the # sign before), and configure the following virtual directory:

<Virtualhost your IP: 8082>
<Directory "D:/confirm">
Options followsymlinks
AllowOverride none
Order allow, deny
Allow from all
</Directory>
DocumentRoot "D:/confirm" // directory
Servername your IP: 8082
Errorlog logs/8082-error_log // log
</Virtualhost>

If you change "your IP address" to your lan ip address, for example, 192.168.1.123, which is used to localhost during local debugging, copy a copy and enter localhost at "your IP address". The peanut shell seems to be directed to the local route after being resolved to the local lan ip address. Therefore, if you only use localhost, it will always be the content of the first virtual directory. If you have configured 80, 8081, 8082, then when you enter zhangyue0503.gicp.net: 8081, it will still point to the content on port 80.


3. In this way, we can configure multiple ports and place different website content. After the configuration is complete, remember to restart the Wamp service.


4. the IIS configuration method is simpler. For example, my IIS is 80, 81, 82, 83, 84 ......, Apache is 8081, 8082, 8083 ...... In this way, IIS and Apache can be run at the same time, regardless of ASP. Net or PHP programs can be shelved for convenient display and testing.



Configure My port 8082



Routing and firewall configuration


1. enter your route configuration, such as 192.168.0.1. If you do not know the specification, the default username and password will also be available in the specification, then enter the "virtual server" configuration, such:



Obviously, fill in the required port after the common port, followed by 192.168.0. enter the IP address that you want to open the port to the outside world. Here, my IP address is 192.168.0.3. Click Add. The current open status is displayed in the list below, and enable is the enabled port.

2. the firewall may have different rules and different configurations. Here, use the firewall that comes with XP to enter the control panel-> firewall-> exceptions-> Add a port, for example:



In this way, this port can be used. After all, it is better to install a firewall when your computer is completely exposed. However, the configurations of various firewalls are basically the same, add Rules and ports.

3. at this point, try to enter the following ports: zhangyue0503.gicp.net: 8081 and 8082. Here, my 8081 port is the default port. The Wamp configuration information is displayed, and 8082 is a sentence written by myself in PHP, check whether the configuration is successful!


Port 8081 content

Port 8082 content


Other applications

Haha, since we are able to access our server site, other applications are just trivial.

1. FTP: add all the virtual directories to FTP. You can activate port 21 for the routing and firewall. If there is no virtual directory on the machine, it will not work. It is very easy to install a ServU.

2. SVN: After installing visual SVN, You can activate port 443 or port 8443 as prompted during installation to use your machine as the version control server, no matter where your project is or when you are working with your friends, it is much more convenient and more comfortable than Google ~~



Have you seen https: // zywalker: 8443/SVN/IPH? Change the computer name zywalker to zhangyue0503.gicp.net, that is, the domain name you applied ~!!

3. remote Control: enable port 3389 and the default port for Windows. enable remote control. Go to my computer> Properties> remote> and check "allow users to remotely link to this computer ":



You can also set a password for the user you are currently logged on to: Control Panel-Local Management-Computer Management-Local Users and user groups-user-right-click to set the administrator password, otherwise, you may not be able to log on. log on to another computer: Start-run-mstsc-enter your domain name-enter the User Name Administrator and your password



Try it now ~

At this point, the computer at home will not be idle because you are at work. Next, we will share something with the company's computer and build the project version library on our own computer, A good project will be shown to the customer. In short, it can be of a lot of use. If it is a waste of power, it will be turned off remotely. Haha, XP shutdown will be shut down from the task manager, 2003 shutdown from the Start menu below.


Cherish the fruits of our work. Although there is not much content, it is also marked with a single word. Please note the reprinted content !! Let's take a look

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.