Minggu, 13 April 2008

MyHomeServer Tutorials - Changing the web server port on your HP Media Vault Server

Remote access IconNetwork Icon Some ISP’s block port 80, and in very few cases, both port 80 and 443. This can be extremely frustrating to some users that require remote access and bought the server simply for this purpose. The problem is, unless you are technical enough to change the ports in your server, your server will not work for using HTTP or HTTPS for remote access to files and photos. This tutorial is designed for the folks who can’t get remote access to work with their HP Media Vault Server, and have tried everything to get this working.

Try this first! - Review the TROUBLESHOOTING TUTORIAL before you change the port on your Media Vault server. This step is a MUST so you can find out what ports are open before you start.

This tutorial makes a few assumptions. First off, we assume you have a basic understanding of networking and you know your router and network layout. You should also know your router password and understand port forwarding, and have found an open port on your network other than port 80. If you are having trouble grasping the port forwarding techniques, check out some of the tutorials at TZO.COM or you can review info at PortForward.com. To recap - If you DO NOT have a good working knowledge of Home IP networking, STOP AND DON’T DO THIS. If you don’t do this properly or make a mistake, you can lock yourself out of your server. Again, we are not responsible!

Secondly, we assume you have tried to solve your remote access issues using our Troubleshooting guide and nothing has worked. It also assumes that you have simplified your network by removing/changing/setting any VOIP Adapters such as Vonage routers properly. It also assumes that if you have a DSL or Cable modem that includes a NAT, you have used bridge mode, set DMZ or disabled the NAT completely. If you have any of these issues as discussed in the troubleshooting guide and have not taken care of this first, this tutorial may not work for you. When it comes to port blocking issues, simplifying the network is the most important thing and will make your troubleshooting much faster.

Important Note: This tutorial applies only for the second generation HP Media Vault Home Servers, model #’s MV2120, MV5140 and MV5150. We only show you how to change the standard port, not the SSL port 443. You CAN edit the SSL port, but this breaks some of the URL’s when launching from the console, so we leave this out of the tutorial. If you wish to change the SSL port, see the note at the end of the tutorial. You must have root access to the server and be able to login to the HP Media Vault server BEFORE you begin, see Setting up your root password and logging into the Media Vault using SSH

IMPORTANT BAIL OUT COMMAND! If something goes wrong or you type the wrong command and start to panic, type: Hit ESC ESC :q! (that’s ESC ESC COLON q EXCLAMATION) to quit without saving the file

Step 1 - Login as root into your Media Vault Server

Step 2 - Once logged in you need to change to the etc directory. Type cd etc and hit enter

Step 3 - You will now be in the etc directory. Type ls and hit enter to get a directory listing. You should see a list of files as shown in the screenshot below

Directory Listing

Step 4 - Once you verify that you are in the proper directory and see the httpd.conf file, you should make a backup of this file BEFORE editing. At the prompt type cp httpd.conf httpdconf.bak and hit enter

Step 5 - You now want to edit the httpd.conf file to add our new port and change one other line. To edit the file, type vi httpd.conf and hit enter and you will see a screen similar to the one shown in the screenshot below:

Directory Listing

Step 6 - Use your down arrow key to scroll down and place your cursor at the Listen 80 line as shown below and then hit the i key to insert into vi and then scroll to the end of the line that says Listen 80 and hit the enter key - this will create a blank line.

Step 7 - Type Listen XXXXX (where XXXXX is the port #) and then use your down arrow key to continue to scroll down until you reach the line that says

Step 8 - Using your right arrow key, scroll to the right to the end of the then hit the backspace key 3 times to delete the 80> and then type *> so the line reads

Step 9 - You are now ready to write and save the file. Hit ESC ESC and then :wq (that’s colon w q) and then hit enter and you will be back to the command prompt.

Step 10 - Type cd inc and hit enter, this will put you in the /etc/inc directory

Step 11 - You will now be in the /etc/inc directory. Type ls and hit enter to get a directory listing. You should see a file called func_httpd.inc in this directory as well as many other .inc files

Step 12 - Make a backup of this file, type cp func_httpd.inc funchttpd.bak

Step 13 - You now want to edit the func_httpd.inc file and make the same changes as we did in the httpd.conf file. To edit the file, type vi func_httpd.inc and hit enter

Step 14 - Use your down arrow key to scroll down and place your cursor at the Listen 80 line as shown below and then hit the i key to insert into vi and then scroll to the end of the line that says Listen 80 and hit the enter key - this will create a blank line.

Step 15 - Type Listen XXXXX (where XXXXX is the port #) and then use your down arrow key to continue to scroll down until you reach the line that says

Step 16 - Using your right arrow key, scroll to the right to the end of the then hit the backspace key 3 times to delete the 80> and then type *> so the line reads

Step 17 - You are now ready to write and save the file. Hit ESC ESC and then :wq (that’s colon w q) and then hit enter and you will be back to the command prompt.

Step 18 - Type killall –HUP httpd and hit enter. This will tell the httpd (web server) to restart and reload the config file. Your server will now be listening on port 80 and the new port you entered! Type exit at prompt to exit out, quit putty and you are all set! Happy Home Serving!

If you get an error, please try this command again. If you continue to get an error, you should exit putty (see below) and use the power button in the back of the unit to restart the server.

Simply forward your new port to the server and you should now be able to reach your server by going to http://xxxx:port (Where xxxx is your domain name that you selected for the server) If you have HTTPS enabled, your server will force the HTTPS connection on the standard port 443

Need to change the SSL port as well? - If you wish to change the SSL port, be aware that this change breaks some of the URLs when launching from the console. If you wish to change the SSL port, enable SSL first in the Network settings, then edit the /etc/ssl.conf file and the 2 files above - changing anywhere it mentions port 443 to the new port. Once finished, perform step 18 and then use https://xxxxx:port to reach your server.

Tidak ada komentar:

Name:*

Email Address:*

Feedback: