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 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default apache error .. vhosts and access

Hello guys
I have a little problem with apache 2.2

I just added a vhost and i access it corectly with www browser, but I dont understand why everytime i open it I got error logged in httpd-error.log
Code:
[Sat Jul 19 03:53:19 2008] [error] [client ip.add.re.ss] client denied by server configuration: /usr/home/ed/wwwgeo/.htaccess
my httpd.conf is almost default, I have only changed default options -indexes, real servername, listen port ... and such things... no vhosts in main file.
For vhosts I have one file in /usr/local/etc/Includes/. Here it is.
Code:
NameVirtualHost *:88

### <--- main virtual host!

<VirtualHost *:88>
ServerName test.pulsar.bg
    DocumentRoot /usr/local/www/pulsar/
    <Directory /usr/local/www/pulsar/>
        allow from all
        allowoverride all
        ###Options +FollowSymLinks -indexes
    </Directory>
    php_admin_flag register_globals on
    php_admin_flag allow_url_fopen off
    php_flag magic_quotes_gpc on
    php_flag display_errors off
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   !^test.pulsar.bg [NC]
    RewriteCond %{HTTP_HOST}   !^$
    RewriteRule ^/(.*)         http://test.pulsar.bg:88/$1 [L,R]
    LogLevel emerg
#    CustomLog /usr/local/www/log/httpd-pulsar-access.log "combined"
    php_value post_max_size 100M
    php_value upload_max_filesize 100M

    Alias /geo /home/ed/wwwgeo
    <Directory /home/ed/wwwgeo>
        AllowOverride All
        Order Allow,deny
        Allow from all
    </Directory>
</VirtualHost>

#### end of main virtual host! --->

<VirtualHost *:88>
ServerName pulsartest.game-host.org
    DocumentRoot /usr/home/ed/wwwgeo
    <Directory "/usr/home/ed/wwwgeo">
        Allow from all
        AllowOverride All
    </Directory>
</VirtualHost>
here is file that makes wwwgeo "indexable" /usr/home/ed/wwwgeo/.htaccess
Code:
Options +Indexes
Actually when i open in my browser http://pulsartest.game-host.org:88 directory is visible (thats what i want) but error is logged. It is not a big pain but it is annoying.
After a few hours of reading and experimentig I dont see where i am wrong. Need help.
10x in advance
Reply With Quote
  #2   (View Single Post)  
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

What on this line in the main httpd:

#Virtual hosts
#Include conf/extra/httpd-vhosts.conf

And post the: /usr/home/ed/wwwgeo/.htaccess --- file

This rewrite rule isn't working:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^test.pulsar.bg [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://test.pulsar.bg:88/$1 [L,R]
Reply With Quote
  #3   (View Single Post)  
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

in main httpd.conf is commented
Code:
# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf
the rewrite rule is working for main host... anyway it is not connected to the problem

about .htaccess I have posted it
here it is again
Code:
Options +Indexes
Reply With Quote
  #4   (View Single Post)  
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

"my httpd.conf is almost default, I have only changed default options -indexes, real servername, listen port ... and such things... no vhosts in main file.
For vhosts I have one file in /usr/local/etc/Includes/. Here it is."

And you have :

# Virtual hosts
#Include etc/apache22/extra/httpd-vhosts.conf

_________________________________

Anyway Try:

<VirtualHost *:88>
ServerName pulsartest.game-host.org
DocumentRoot /usr/home/ed/wwwgeo
<Directory "/usr/home/ed/wwwgeo">
RewriteEngine On
Options FollowSymLinks
Options All
AllowOverride All
Allow from alll
</Directory>
</VirtualHost>
Reply With Quote
  #5   (View Single Post)  
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

I tried it ...
no change ... I can open the site but again error is logged

Code:
[Sat Jul 19 19:29:08 2008] [error] [client 77.70.66.90] client denied by server configuration: /usr/home/ed/wwwgeo/.htaccess
Reply With Quote
  #6   (View Single Post)  
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

Let's move from the <Directory> Container:

<VirtualHost *:88>
ServerName pulsartest.game-host.org
DocumentRoot /usr/home/ed/wwwgeo

RewriteEngine On
Options FollowSymLinks

<Directory "/usr/home/ed/wwwgeo">
Options All
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
Reply With Quote
  #7   (View Single Post)  
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

done...
same result - the page opens, but error is still logged:

Code:
[Sat Jul 19 19:39:31 2008] [error] [client 77.70.66.90] client denied by server configuration: /usr/home/ed/wwwgeo/.htaccess
i dont thing that rewrite engine has a mess with the problem ...
Reply With Quote
  #8   (View Single Post)  
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

Run this:

/usr/local/apache2/bin/httpd -S
Reply With Quote
  #9   (View Single Post)  
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

Code:
[root@test /usr/local/etc/apache22]# httpd -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:88                   is a NameVirtualHost
         default server test.pulsar.bg (/usr/local/etc/apache22/Includes/wwwpulsarbg.conf:7)
         port 88 namevhost test.pulsar.bg (/usr/local/etc/apache22/Includes/wwwpulsarbg.conf:7)
         port 88 namevhost pulsartest.game-host.org (/usr/local/etc/apache22/Includes/wwwpulsarbg.conf:78)
Syntax OK
Reply With Quote
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

(It's been a long day)

How has game-host.org been configured to redirect pulsartest.game-host.org to your server?
Reply With Quote
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

:>>

pulsartest.game-host.org is registered as a host at www.dyndns.org to point to ip 78.142.42.147
Reply With Quote
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

213.130.70.6 = [ pulsar.bg ]
Reply With Quote
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

yep but what is the connection
78.142.42.42 has been registered at more than one dns servers:>
213.130.70.6 too
Reply With Quote
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

This has nothing to do with Apache.
Reply With Quote
Old 19th July 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

What the the DocumentRoot set for in httpd.conf... and I mean for the main Apache config, not for your vhost defined above.

Reason I ask is because if your main DocumentRoot is set to something and you set a vhost oustide of that, you might have problems
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

yep outside is...

Code:
DocumentRoot "/usr/local/www/apache22/data"
Reply With Quote
Old 19th July 2008
cajunman4life cajunman4life is offline
Real Name: Aaron Graves
Package Pilot
 
Join Date: May 2008
Location: Coolidge, Arizona
Posts: 203
Default

Just for kicks, set it to /usr/home, restart apache, and see what you get.

I keep all my hosts on a /www filesystem, so an example...

Main DocumentRoot is /www

DocumentRoot for vhosts is /www/<username>/<url>
__________________
I just saved a bunch of money on my car insurance by fleeing the scene of the accident!
Reply With Quote
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

I tried it ... no difference ... error is still logged
Reply With Quote
Old 19th July 2008
hunteronline hunteronline is offline
Fdisk Soldier
 
Join Date: Jul 2008
Posts: 52
Default

pulsartest.game-host.org isn't yours and you don't control it. Why are you using it in the Vhost file? What is the hostname of the server?
Reply With Quote
Old 19th July 2008
edhunter's Avatar
edhunter edhunter is offline
Real Name: Georgi Iovchev
Port Guard
 
Join Date: May 2008
Location: Sofia, Bulgaria
Posts: 41
Default

pulsartest.game-host.org is mine
game-host.org is not
hostname of the server is test.pulsar.bg

from rc.conf
Code:
hostname="test.pulsar.bg"
ifconfig_vr0="inet 78.142.42.147/28"

Last edited by edhunter; 19th July 2008 at 09:07 PM.
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
error while installing apache Nk2Network OpenBSD Packages and Ports 4 13th April 2009 08:45 PM
Upgrade Apache 1.3 mod_ssl to Apache 2.2 beandip FreeBSD Ports and Packages 11 26th March 2009 09:12 PM
Apache 2.2 + vhosts DNAeon FreeBSD Ports and Packages 12 16th February 2009 06:02 PM
pf allow ftp access ijk FreeBSD Security 9 25th August 2008 04:12 AM
CD Access in KDE Scott FreeBSD General 10 13th May 2008 05:48 AM


All times are GMT. The time now is 06:49 AM.


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