Unix Technical Forum

Why can't I start apache on port != 80 ?

This is a discussion on Why can't I start apache on port != 80 ? within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> I have a Sun SPARCstation 20 on which I want to run a web server on port 8080. Apache ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 08:35 AM
Dr. David Kirkby
 
Posts: n/a
Default Why can't I start apache on port != 80 ?

I have a Sun SPARCstation 20 on which I want to run a web server on
port 8080. Apache 1.3.27 is installed This is the stock Sun version -
I have not built my own version from sources. I have installed the odd
security patch or two.

No matter what I do, I can't seem to get this to work properly on port
8080, or any port other than 80. I've copied the following 3 files to
something else:
* /etc/init.d/apache
* /etc/apache/httpd.conf
* /usr/apache/apachectl

then run: ./apache8080 start

(see details below), but can't get it to run properly. A number of
/usr/apache/bin/httpd processes start, but connections on port 8080
are always refused, wheras those on port 80 are okay. It seems like
the apache is completely ignoring the 'Port' directive in the
configuration file.

Any ideas - have I overlooked something?

Dr. David Kirkby



# diff /etc/init.d/apache /etc/init.d/apache8080
9,10c9,10
< CONF_FILE=/etc/apache/httpd.conf
< PIDFILE=/var/run/httpd.pid
---
> CONF_FILE=/etc/apache/httpd8080.conf
> PIDFILE=/var/run/httpd8080.pid

13a14
> echo no config file

62c63
< status=`${APACHE_HOME}/bin/apachectl $1 2>&1`
---
> status=`/apachectl8080 $1 2>&1`


I also changed the configuration file /etc/apache/httpd.conf


# diff /etc/apache/httpd.conf /etc/apache/httpd8080.conf
88c88
< PidFile /var/run/httpd.pid
---
> PidFile /var/run/httpd8080.pid

96c96
< ScoreBoardFile /var/run/httpd.scoreboard
---
> ScoreBoardFile /var/run/httpd8080.scoreboard

322c322
< Port 80
---
> Port 8080


and I copied /usr/apache/apachectl to /apachectl8080 and made a change
to that too:

# diff /usr/apache/bin/apachectl /apachectl8080
25c25
< PIDFILE=/var/run/httpd.pid
---
> PIDFILE=/var/run/httpd8080.pid

#
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 08:35 AM
Klaus Grote
 
Posts: n/a
Default Re: Why can't I start apache on port != 80 ?

see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) wrote in message news:<c99d2c79.0407111535.2a6e9634@posting.google. com>...
> I have a Sun SPARCstation 20 on which I want to run a web server on
> port 8080. Apache 1.3.27 is installed This is the stock Sun version -
> I have not built my own version from sources. I have installed the odd
> security patch or two.
>
> No matter what I do, I can't seem to get this to work properly on port
> 8080, or any port other than 80. I've copied the following 3 files to
> something else:
> * /etc/init.d/apache
> * /etc/apache/httpd.conf
> * /usr/apache/apachectl
>
> then run: ./apache8080 start
>
> (see details below), but can't get it to run properly. A number of
> /usr/apache/bin/httpd processes start, but connections on port 8080
> are always refused, wheras those on port 80 are okay. It seems like
> the apache is completely ignoring the 'Port' directive in the
> configuration file.
>
> Any ideas - have I overlooked something?
>
> Dr. David Kirkby
>
>
>
> # diff /etc/init.d/apache /etc/init.d/apache8080
> 9,10c9,10
> < CONF_FILE=/etc/apache/httpd.conf
> < PIDFILE=/var/run/httpd.pid
> ---
> > CONF_FILE=/etc/apache/httpd8080.conf
> > PIDFILE=/var/run/httpd8080.pid

> 13a14
> > echo no config file

> 62c63
> < status=`${APACHE_HOME}/bin/apachectl $1 2>&1`
> ---
> > status=`/apachectl8080 $1 2>&1`

>
> I also changed the configuration file /etc/apache/httpd.conf
>
>
> # diff /etc/apache/httpd.conf /etc/apache/httpd8080.conf
> 88c88
> < PidFile /var/run/httpd.pid
> ---
> > PidFile /var/run/httpd8080.pid

> 96c96
> < ScoreBoardFile /var/run/httpd.scoreboard
> ---
> > ScoreBoardFile /var/run/httpd8080.scoreboard

> 322c322
> < Port 80
> ---
> > Port 8080

>
> and I copied /usr/apache/apachectl to /apachectl8080 and made a change
> to that too:
>
> # diff /usr/apache/bin/apachectl /apachectl8080
> 25c25
> < PIDFILE=/var/run/httpd.pid
> ---
> > PIDFILE=/var/run/httpd8080.pid

> #


Hey David,

this correct. The apache binary has the path to the httpd.conf file
compiled in. You must start the binary with -f /path/and_name/to_the_new_conf
file. Change your apachectl or apache8080 file and insert at the start option
httpd -f /etc/apache/httpd8080.conf

CU
Klaus Grote
DNS GmbH
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 08:36 AM
Dr. David Kirkby
 
Posts: n/a
Default Re: Why can't I start apache on port != 80 ?

klaus.grote@web.de (Klaus Grote) wrote in message news:<93bac7d6.0407112307.7f987852@posting.google. com>...
> see_my_signature_for_my_real_address@hotmail.com (Dr. David Kirkby) wrote in message news:<c99d2c79.0407111535.2a6e9634@posting.google. com>...
> > I have a Sun SPARCstation 20 on which I want to run a web server on
> > port 8080. Apache 1.3.27 is installed This is the stock Sun version -
> > I have not built my own version from sources. I have installed the odd
> > security patch or two.
> >
> > No matter what I do, I can't seem to get this to work properly on port
> > 8080, or any port other than 80. I've copied the following 3 files to
> > something else:
> > * /etc/init.d/apache
> > * /etc/apache/httpd.conf
> > * /usr/apache/apachectl
> >
> > then run: ./apache8080 start

>
> Hey David,
>
> this correct. The apache binary has the path to the httpd.conf file
> compiled in. You must start the binary with -f /path/and_name/to_the_new_conf
> file. Change your apachectl or apache8080 file and insert at the start option
> httpd -f /etc/apache/httpd8080.conf
>
> CU
> Klaus Grote
> DNS GmbH


Thanks a lot, that solved the probelem - the server is now running on
port 8080. I erronously assumed that if I set the path to the apache
configuration file in /etc/init.d/apache8080, then apache would use
that file.


Dr. David Kirkby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com