DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 21st May 2008
dctr dctr is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Default Lighthttpd Problem ( Permission ) [changed]

#################################################
# ignore this post #
#################################################
Forbidden

You don't have permission to access / on this server.


That's what I get when I put localhost:80 / 127.0.0.1:80 into my browser. Not sure exactly why though.

I followed this,http://www.freebsdmadeeasy.com/tutor...on-freebsd.php . However I also would like to point out that I did not use apache22 but instead apache21 as I was getting errors installing apache22 ( something about where the files were going to be extracted another package was extracted there )

-dctr

Last edited by dctr; 22nd May 2008 at 03:28 AM.
Reply With Quote
  #2   (View Single Post)  
Old 21st May 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

By default Apache denies everything. Look at your <Directory> directives and make sure that your web root is "allowed". You can also post you httpd.conf if further help is needed.
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #3   (View Single Post)  
Old 21st May 2008
dctr dctr is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Default

I think I may be having some problems because I have the version from sysinstall, which is a different version than going straight from ports.

apache-2.2.6_2 Version 2.2 of Apache web server with prefork MPM.

And I also have 4 httpd.conf files, one in the /usr/local/etc/apache/ directory, one in the /usr/local/etc/apache2/ and one in the /usr/local/etc/apache22/ directory and another in the /usr/local/share/examples/apache22/ directory.

I am guessing /apache2/ is the one I should be editing, or am I wrong? How do I find out?

either way, here

http://apache.pastebin.com/m7e5ac150


-dctr

PS: Did I mention I am new to UNIX ;x
Reply With Quote
  #4   (View Single Post)  
Old 21st May 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

I have a port of Apache 2.2 installed and my httpd.conf resides in /usr/local/etc/apache22. I guess it is that one.

What are the lines related to this problem in you error log file?
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #5   (View Single Post)  
Old 21st May 2008
businessgeeks businessgeeks is offline
New User
 
Join Date: May 2008
Posts: 9
Default

I usually get this when I setup another VirtualHost so i can host virtual domains on a single freeBSD box. So assuming youre in the same situation, you might want to check what i did.

first based on your pastebin output, i need you to look at line 359 to 364.

Code:
<Directory />
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>
This the section that says that you cannot access anything outside your current virtualhost documentroot. on the default apache 2.2 install in freebsd, it is indicated as:

Code:
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/usr/local/www/data"
No issues here, actually thats good security measure. Now all you need to do is to add a directory tag in your virtualhost entry that allows you overied the above statement

Code:
<Directory />
    AllowOverride All
    Order Allow,Deny
    Allow from All
</Directory>
here is an example virtualhost entry to give you a better picture:

Code:
<Virtualhost 111.222.333.444:80>
     ServerName domain.com
     DocumentRoot /path/to/documentroot
     <Directory /path/to/documentroot>
        AllowOverride All
        Order Allow,Deny
        Allow from All
     </Directory>
</VirtualHost>
Hope this helps, let me know if you got it running! cheers!
Reply With Quote
  #6   (View Single Post)  
Old 21st May 2008
dctr dctr is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Default

[Tue May 20 18:39:23 2008] [notice] Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.8e DAV/2 configured -- resuming normal operations
[Tue May 20 18:40:23 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/

Those are the newset.

err.

Code:
[Wed May 21 03:30:52 2008] [notice] Apache/2.2.6 (FreeBSD) mod_ssl/2.2.6 OpenSSL/0.9.8e DAV/2 PHP/5.2.6 with Suhosin-Patch configured -- resuming normal operations
[Wed May 21 03:30:53 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/
[Wed May 21 03:30:54 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/
[Wed May 21 03:31:02 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/data
[Wed May 21 04:05:36 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/data
those are the newest lines.
Reply With Quote
  #7   (View Single Post)  
Old 21st May 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

@businessgeeks:

Yeah but:
Code:
# DocumentRoot "/usr/local/www/data"
<Directory "/usr/local/www/data">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
@dctr:
Just to make sure, you did restart the Apache process after editing the httpd.conf file?
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote
  #8   (View Single Post)  
Old 21st May 2008
dctr dctr is offline
Port Guard
 
Join Date: May 2008
Posts: 30
Default

Quote:
Originally Posted by stukov View Post
@businessgeeks:

Yeah but:
Code:
# DocumentRoot "/usr/local/www/data"
<Directory "/usr/local/www/data">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
@dctr:
Just to make sure, you did restart the Apache process after editing the httpd.conf file?
Yup, I did.

I am very confused from the post above.


Code:
<Directory />
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/usr/local/www/data">
Do you want me to change that... to say..

Code:
##########
#comment all this out? since it will be below...
#<Directory />
#    AllowOverride None
#    Order Deny,Allow
#    Deny from all
#</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#

<Virtualhost 111.222.333.444:80>
     ServerName domain.com
     DocumentRoot /path/to/documentroot
     <Directory /path/to/documentroot>
        AllowOverride All
        Order Allow,Deny
        Allow from All
     </Directory>
</VirtualHost>

It's so late (4:30am) and I am trying to do my best, bare with me.

Last edited by dctr; 21st May 2008 at 08:29 AM.
Reply With Quote
  #9   (View Single Post)  
Old 27th May 2008
AlexDudko AlexDudko is offline
New User
 
Join Date: May 2008
Posts: 5
Default

There's a mistake in your httpd.conf file in DocumentRoot.
Look up once more. If you really have <Directory "/usr/local/www/data">, then you wouldn't have this line:
[Wed May 21 03:31:02 2008] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/apache22/data

You have ...apache22... directory, which could not be there.
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Big5 Character Set in Apache problem after upgrade to 6.4 paul-lkw FreeBSD Installation and Upgrading 0 23rd February 2009 09:20 AM
Apache: problem with rewritten content-type header Malakim General software and network 2 3rd December 2008 07:51 PM
Samba + Ldap... permission problem coppermine FreeBSD General 3 13th October 2008 10:00 AM
Problem with php and apache on OpenBSD co_bofh OpenBSD General 10 27th July 2008 10:13 PM
apache fd size problem oxy FreeBSD Ports and Packages 0 10th May 2008 10:49 AM


All times are GMT. The time now is 12:16 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick