How to setup a PORT

Thread Tools Search this Thread
Special Forums IP Networking How to setup a PORT
# 1  
Old 09-11-2002
How to setup a PORT

Hi there,

I need to specify a port on my server (Linux Red Hat 7.2) so that when I access it throgh the browser it forwards me to a certain webpage or folder on the server.

For example, when I write[FreePort] on the client side, it takes me to an administrator webpage on the server.

How can I do this??

# 2  
Old 09-11-2002
Are you using apache as your web server?

if you are using apache then you need
make some modification to your httpd.conf

Here are the modifications

port (specify the port) eg

port 8080

or to have multiple web site with
different port you can use virtual host
here is the modification you will need to make to your httpd.conf

NameVirtualHost 157.x.x.x
<virtualHost 157.x.x.x>
DocumentRoot /usr/local/apache/htdoc

then stopped and started apache

157.x.x.x will be your web server ip address
DocumentRoot will be were your web file are that html, htm or php files

Last edited by hassan2; 09-11-2002 at 09:53 AM..
# 3  
Old 09-14-2002
MySQL Thanks.. it WORKED

But it displays the HTML pages only, I need to execute PHP code through this port.

When I access a PHP page with the new port only the HTML code is executed!!

Any Idea how to solve this, note that I tried to simulate the port 80 entries, but still I cannot execute PHP using the new port.

Thanks again.
# 4  
Old 09-18-2002
Are you trying to execute php as your default web page?

if you are, then you need to modify this section of your httpd.conf file:

<IfModule mod_dir.c>
DirectoryIndex index.php

then stop and start apache

index.php will be the name of your php file.
e.g if your php file is called welcome.php

the section of httpd.conf file will look like

<IfModule mod_dir.c>
DirectoryIndex welcome.php
# 5  
Old 09-21-2002
Data It is already done!!

Hi there..

I checked the httpd.conf file, the entry you mentioned was already added, and it's well functioning through thr ports 80, 443.

The problem was that I cannot execute any .php file using the port I configured, as I mentioned previously, the HTML code is executing perfictly. The problem is with the server side code like PHP.

e.g:- >> This will work perfectly


http://mydomain:port/index.php >> only the HTML and non PHP code will be executed, any code between <?php ?> wont execute.

I hope it's clear now, note that I am working on live Web Server and using PHP mainly.

I hope to find a solution for this problem.

# 6  
Old 09-22-2002
To be able to excute a php script on apache, you need to add the
following lines to your httpd.conf file

add this line to your Addhandler Directives:

AddHandler cgi-script .cgi .pl

and add this lines to your php Directives:

ScriptAlias /php/ "/usr/local/apache/php"
AddType application/x-httpd-php .php

finally stop and start apache or since you on live web server you
can issue

kill -TERM `cat /usr/local/apache/logs/`

this will cause any changes to apache's httpd.conf file take affect
without stopping apache.

ScriptAlias /php/ "/usr/local/apache/php"

/usr/local/apache/php will be the location of your php file. e.g
if the local of your php is /www your ScriptAlias will be
ScriptAlias /php/ "/www/php"
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

2. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

3. Web Development

Setup Serial Port

I need to set a serial port to 9600 7E1. How do I accomplish this? I've tried every combination, with no luck. (6 Replies)
Discussion started by: Meow613
6 Replies

4. Solaris

How to enable Serial port on ILOM, when Network Port is enabled in parallel

Hi Everyone, In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies

5. AIX

SMC multi port Printserver setup on AIX 6.1

Hi Guys, I have SMC 3 port print server would liek to create 3 queues for each port , please advice what port name or number should be used while creating the quues , I have hpjetdirect and I have tried raw1, raw2 and raw3 on it and it works but it doesnt work for SMC , please advice. ... (1 Reply)
Discussion started by: Valeed
1 Replies

6. AIX

Console Setup for RS-232 port on 9131-52A

Hi, I have tried to setup the console on a Power5 9131-52A type IBM Server. On the back there are 2 RS-232 ports labeled T1 T2. I am going under the assuming that these are the serial ports (Normally the serial ports are S1 S0). When I finish assigning the console under smit, I get no response... (3 Replies)
Discussion started by: mrmurdock
3 Replies

7. AIX

NIM server setup on etherchannel setup environment

I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

8. Solaris

URGENT - setup port and dump all output to /dev/null or a file

Please help urgently. I need to setup up some sort of service on a solaris server on a port. I dont need it do anything special, anything that is sent to this port from an external server should be dump to /dev/null or a flat file.. Can you help urgently? (1 Reply)
Discussion started by: frustrated1
1 Replies

9. IP Networking

printer port setup

Does anybody know how to add a printer from network in Solaris 10 using IP settings? according to our IT support, in order to add this printer in Windows XP we introduce it as a local printer which is connected to a port with an IP address, like Anyway I don't know how it can be done... (3 Replies)
Discussion started by: arash05
3 Replies
Login or Register to Ask a Question