Re: Httpd.comf file and possible configuration issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Arthur Pesa wrote:
> Thanks for the additional insight. I think I have gotten past the startup
> error. I cp'd /private/etc/httpd/httpd.conf to httpd.conf.bak. I then
> restarted apache and the new installation seems to work. However I have a
> couple questions.
> 
> I am using the following command line to start the server:
> 
> ap0041-macosx:/usr/local/apache2 arthurpesa$ sudo
> /usr/local/apache2/bin/apachectl -k graceful
> Password:

Since you are calling it with an absolute path, the results from
"which" don't matter. What "which" tells you is what happens if you
don't use the absolute path. You could try adding /usr/local to your
$PATH variable in the shell, but for my two cents, I would stick with
the absolute path.

> ap0041-macosx:/usr/local/apache2 arthurpesa$ which apachectl
> /usr/sbin/apachectl
> ap0041-macosx:/usr/local/apache2 arthurpesa$ which httpd
> /usr/sbin/httpd
> ap0041-macosx:/usr/local/apache2 arthurpesa$
> 
> As you can see which returns the old version of httpd and apachectl. However
> in logs/error.log it claims:
> [Wed May 16 10:45:15 2007] [notice] Graceful restart requested, doing
> restart
> [Wed May 16 10:45:15 2007] [notice] Apache/2.2.4 (Unix) configured --
> resuming normal operations
> 
> Also, the pid in logs/httpd.pid has the same pid as found in the activity
> monitor for the process httpd, pid = 249.
> 
> So, it seems to work. I am now looking at a permission to access problem.
> The Sites folder which is my web root gives me a 403 error:
> 
> [Wed May 16 10:51:44 2007] [error] [client 192.168.15.104] client denied by
> server configuration: /Users/arthurpesa/public_html

Your original httpd.conf will show you how to allow access to
/Users/arthurpesa/Sites/, if you intend to use
/Users/arthurpesa/public_html/ instead, modify the httpd.conf accordingly.

If you are accidentally redirecting ~/Sites/ to ~/public_html/, then
remove the redirect.

Note that the standard (1.3) installation uses this convention:

a call to http://yourIP/~arthurpesa/

displays files from /Users/arthurpesa/Sites/

(/Sites/ does not show up in the URL--see your original httpd.conf for
how they do this.)

So if you have put /public_html/ above the /Sites/ directory, simply
move the contents and make sure your file permissions are set correctly.

I hope this helps,
Robert


> The error is obvious, but where to fix it in the conf file is not. If you
> have any suggestions I would appreciate them. I thought about starting a new
> thread, but was hoping this is simple enough.
> 
> Thanks,
> -Pat
>  
> 
> 
> 
> On 5/16/07 10:01 AM, "Robert T Wyatt" <robert.wyatt@xxxxxxxxxxxxxxx> wrote:
> 
>> What is "shutting down" is the new instance, not the already-running
>> instance.
>>
>> Try using "graceful" instead of "start"; if it is already running this
>> might restart it assuming they are the same program (both version 2
>> and not the factory installed version 1).
>>
>> You might also try using the lsof command to determine whether
>> something else (like QuickTime Streaming Server) is using port 80.
>>
>>
>> Arthur Pesa wrote:
>>> Thanks, 
>>> I compiled and installed apache2.2.4 in usr/local/apache2 (by default). I
>>> have disabled Web Sharing in prefs from the start. After the install and
>>> initial start command I noticed it was using the httpd.conf file from
>>> private/etc/httpd (this is shipped from Apple and will start apache version
>>> 1.3.3). I also noticed this was the version of apache that was running. I
>>> killed those pids in activity monitor and then issued the following command
>>> to start apache.
>>>
>>> ap0041-macosx:/usr/local/apache2 arthurpesa$ sudo
>>> /usr/local/apache2/bin/apachectl -f /usr/local/apache2/conf/httpd.conf -k
>>> start
>>> (48)Address already in use: make_sock: could not bind to address [::]:80
>>> (48)Address already in use: make_sock: could not bind to address 0.0.0.0:80
>>> no listening sockets available, shutting down
>>> Unable to open logs
>>> ap0041-macosx:/usr/local/apache2 arthurpesa$
>>>
>>> As you can see it claims to be shutting down, but it actually is running. I
>>> know this because I have a page that generates a 403 access error and in the
>>> resulting apache access error page it states the version as apache 2.2.4.
>>>
>>> Sorry for the long response and thanks for your help,
>>> -Pat
>>>
>>>
>>> On 5/16/07 9:21 AM, "Robert T Wyatt" <robert.wyatt@xxxxxxxxxxxxxxx> wrote:
>>>
>>>> Arthur Pesa wrote:
>>>>> I have downloaded and compiled apache 2.2.4 on my Mac Powerbook G4 OS X
>>>>> 10.4.9. I did not make any significant changes to the httpd.conf file
>>>>> initially. I started the server and it error¹d on startup with the
>>>>> following messages in terminal. I am not getting anything relevant to
>>>>> this error in logs/error.log.
>>>>>
>>>>> (48)Address already in use: make_sock: could not bind to address [::]:80
>>>>> (48)Address already in use: make_sock: could not bind to address 0.0.0.0:80
>>>>>
>>>>> Also, I am able to see httpd processes in activity monitor, but they
>>>>> have different pid¹s than the one found in logs/httpd.pid. I am assuming
>>>>> those are processes started by the shipped version of apache from Apple,
>>>>> which I would like to disable but don¹t quite know how. To start the
>>>>> apache server I am using the full path to the new apache installation as
>>>>> well as the apachectl ­f to pass the location and file name of the
>>>>> httpd.conf file I want to use.
>>>>>
>>>>> Changes to conf/httpd.conf
>>>>> Servername 127.0.0.1 as well as my IP-( not at the same time)
>>>>> ServerAdmin (my email address)
>>>>> DocumentRoot (my Sites Folder at ³/users/arthurpesa/Sites²)
>>>>>
>>>>> I have not changed anything else yet. Any insight is greatly appreciated,
>>>>>
>>>>> Thanks,
>>>>> Pat
>>>> You can disable the built in httpd by going to your system prefs file
>>>>> sharing > disable web sharing.
>>>> You can check which httpd and apachectl are being used with (in
>>>> Terminal.app):
>>>> which httpd
>>>> which apachectl
>>>>
>>>> How/where did you install 2.2.4?
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux