LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2011, 06:44 AM   #1
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Rep: Reputation: 15
Httpd configuration, not root


Hi all,

I'm a user (no root permissions) but I've been given permissions to the /export directory; I need to start apache but I cannot use port 80 (...not root). They've installed apache for me but it's a bit different than /etc/httpd like I'm used to.

Here's an ls of my directory

Code:
bash-3.2$ ls
ABOUT_APACHE   config.status        InstallBin.dsp  NWGNUmakefile
acinclude.m4   configure            LAYOUT          os
Apache.dsw     configure_backup.in  libhttpd.dsp    README
build          configure.in         LICENSE         README.platforms
BuildAll.dsp   configure.in~        Makefile        README-win32.txt
BuildBin.dsp   docs                 Makefile.in     ROADMAP
buildconf      emacs-style          Makefile.win    server
buildmark.o    httpd                modules         srclib
CHANGES        httpd.dsp            modules.c       support
config.layout  httpd.spec           modules.lo      test
config.log     include              modules.o       VERSIONING
config.nice    INSTALL              NOTICE
There is httpd.conf in the docs folder but that looks more like a template, so I figure the only file that makes sense to search is configure.in and then run the configure script. I found some port settings in configure.in but changing them didn't make a difference.

So right now I just searched in the configure script and found a couple lines that are interesting.

Code:
Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --with-included-apr     Use bundled copies of APR/APR-Util
  --with-apr=PATH         prefix for installed APR or the full path to
                             apr-config
  --with-apr-util=PATH    prefix for installed APU or the full path to
                             apu-config
  --with-pcre=PATH        Use external PCRE library
  --with-port=PORT        Port on which to listen (default is 80)
  --with-sslport=SSLPORT  Port on which to securelisten (default is 443)
Is this saying to specify port run
Code:
./configure --with-port=8081
???

Then I found this line down below where I specified port in the else (default was 80)..
Code:
# Check whether --with-port was given.
if test "${with_port+set}" = set; then
  withval=$with_port; if test "$withval" = "yes"; then { { $as_echo "$as_me:$LINENO: error: 'option --with-port requires a value (the TCP port number)'" >&5
$as_echo "$as_me: error: 'option --with-port requires a value (the TCP port number)'" >&2;}
   { (exit 1); exit 1; }; }; else PORT="$withval"; fi
else
  PORT=8081
fi
Thanks for the help!
Chris
 
Old 02-25-2011, 06:51 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
OK, so from only what you've shown us they have *NOT* installed apache for you. That's just the contents of the source tarball from which you would build it. Ignore port level configs here, that would be relevant much much later, IF you are really meant to be at this stage. If you need to do stuff with apache then surely the admins should give you root access, or finer control via sudoers to enable you to do specific things like restarting apache only. Can you even compile the software here, are all the compilers and dev packages installed? If you are going to *have to* compile yourself (hint... don't.) then you'd only really want to override the installation location so it would install within your home directory or some such suitable less priveledged location, but this seems a *very* weird way to accomplish just about anything.
 
Old 02-25-2011, 06:52 AM   #3
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
I just tried the configure --with-port=8081 and ran the script but to no avail

Code:
bash-3.2$ ./httpd 
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
...
 
Old 02-25-2011, 06:55 AM   #4
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Yea they were supposed to give me sudo privleges but... wait for it...
Code:
bash-3.2$ sudo
>>> /etc/sudoers: syntax error near line 47 <<<
sudo: parse error in /etc/sudoers near line 47
sudo: no valid sudoers sources found, quitting
 
Old 02-25-2011, 06:57 AM   #5
chris24300
Member
 
Registered: Jul 2009
Posts: 58

Original Poster
Rep: Reputation: 15
Once that is fixed.. if it's ever fixed.. couldn't I use sudo to run httpd in /etc/init.d ?

Thanks,
Chris
 
Old 02-25-2011, 07:00 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well if you are using sudoers then you'd just use a default Apache install in the first place.

---------- Post added 25-02-11 at 01:00 PM ----------

Quote:
Originally Posted by chris24300 View Post
I just tried the configure --with-port=8081 and ran the script but to no avail

Code:
bash-3.2$ ./httpd 
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
...
Right, so you'd use the Listen directive in the config file to set this anyway. The defaults don't matter.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
(CentOS 5.3 server) httpd.conf configuration issue involving DirectoryIndex xshad0wfx Linux - Server 4 06-19-2009 10:32 PM
httpd.conf configuration Ameii83 Linux - General 1 06-07-2006 01:24 AM
HTTPD configuration issue rblampain Linux - General 4 08-14-2005 12:19 AM
Managing dns and httpd for users beside root Dakkar Linux - General 2 08-02-2005 05:08 PM
configuration of httpd.conf to run apache server adityabhat2 Linux - Newbie 2 02-13-2005 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration