SunQuest
 
           Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old October 15th, 2003, 06:32 PM
mirmil mirmil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Serbia
Posts: 8 mirmil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 2 m 8 sec
Reputation Power: 0
Question Apache VirtualHost Problem!

Apache 1.3.28 on Windows XP

In my http.conf file I have two Virtual Hosts. They are configured practically the same way:

<VirtualHost www.mywebs>
ServerAdmin webmaster@mywebs
ServerName www.mywebs
DocumentRoot "D:/MyWebs"
ErrorLog logs/mywebs.example.com-error_log
CustomLog logs/mywebs.example.com-access_log common
</VirtualHost>

<VirtualHost *>
ServerAdmin webmaster@localhost.com
ServerName www.dunav.dom
DocumentRoot "D:/My Documents/My Webs/dunav"
ErrorLog logs/dunav-host.example.com-error_log
CustomLog logs/dunav-host.example.com-access_log common
</VirtualHost>

In the first case I am allowed to see the content of root directory but in the case of www.dunav.dom I can see just index file, otherwise I am getting 403 error:
“Forbidden
You don't have permission to access / on this server”

What is the catch?


Thank you all in advance,
Miroslav

Reply With Quote
  #2  
Old October 16th, 2003, 07:03 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Does the Web user have permission to read that directory?

Reply With Quote
  #3  
Old October 16th, 2003, 08:42 AM
mirmil mirmil is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Serbia
Posts: 8 mirmil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 2 m 8 sec
Reputation Power: 0
Quote:
Originally posted by dhouston
Does the Web user have permission to read that directory?


Obviously I have to start from the beginning:
At my local machine I have installed Apache 2.0.47 and Apache 1.3.28 and I don’t run them in the seam time.
I use them just to test my PHP and MySql scripts.
At each server I have made 5 Virtual Hosts, configured practically the same way.
Writing this message and wrestling with my English I noticed that at both servers, virtual host which are not at the path of localhost don’t let my see directory content (Forbiden...), but index file.
Others, at the localhost path do not show 403 Error.
The right question had to be: How I can control it and how I can assign permissions to each particular Virtual Host.
Sorry that I didn’t formulate the problem correctly at the first place!
Thanks,
Miroslav

PS: OS Windows XP professional.

Reply With Quote
  #4  
Old October 16th, 2003, 09:44 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
I've never run apache on Windows, so I may not be the best person to help out with this. I imagine you could just right-click the folder in question (D:/My Documents/My Webs/duna) and change the permissions, making it readable by anybody. Or you could try creating subfolders within D:/MyWebs and pointing the DocumentRoot directives to those. Perhaps that's what you're already attempting -- if so, your error may be that you've got an extra "My Documents" in the second virtual host entry listed below.

Reply With Quote
  #5  
Old December 14th, 2003, 04:24 AM
pyc pyc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 pyc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problem continued....

I have similar problem too...

I want 2 virtual sites: one for localhost, and another one for home.localhost

I tried to put this in hosts file:
127.0.0.1 localhost
127.0.0.1 home.localhost

and this to httpd.conf:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot d:/phpdev/www
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName home.localhost
DocumentRoot d:/phpdev/www/home
</VirtualHost>



there is no chance for this to work... I tried lots of other combinations, too... please help!

pyc

P.S.: pozdrav za komsiju (pokretaca ovog treda)....

Reply With Quote
  #6  
Old December 14th, 2003, 03:53 PM
Mike_r Mike_r is offline
ExoCrew
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 68 Mike_r User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Are you trying to see the directory listing ? i.e. all files in a directory through browser.

Reply With Quote
  #7  
Old December 16th, 2003, 08:03 AM
pyc pyc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 pyc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by Mike_r
Are you trying to see the directory listing ? i.e. all files in a directory through browser.


yes, but that was not the problem... the problem was with order of directives... you must place subdomains first, in httpd.conf file, definitely... and i think it's a bug, ain't it?

pyc

Reply With Quote
  #8  
Old December 18th, 2003, 12:52 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
Re: Problem continued....

Quote:
Originally posted by pyc
I have similar problem too...

I want 2 virtual sites: one for localhost, and another one for home.localhost

I tried to put this in hosts file:
127.0.0.1 localhost
127.0.0.1 home.localhost

and this to httpd.conf:

NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot d:/phpdev/www
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName home.localhost
DocumentRoot d:/phpdev/www/home
</VirtualHost>



there is no chance for this to work... I tried lots of other combinations, too... please help!

pyc

P.S.: pozdrav za komsiju (pokretaca ovog treda)....


Change NameVirtualHost 127.0.0.1 to
NameVirtualHost *

Then change this
Code:
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot d:/phpdev/www
</VirtualHost>

<VirtualHost 127.0.0.1>
ServerName home.localhost
DocumentRoot d:/phpdev/www/home
</VirtualHost>
to
Code:
<VirtualHost *>
ServerName localserver
DocumentRoot d:/phpdev/www/
</VirtualHost>

<VirtualHost *>
ServerName home.localserver
DocumentRoot d:/phpdev/www/home/
</VirtualHost>

And see if that works
For my setup, I actually have a hosting directory (for the sites that I host) and a htdocs directory where my main site is located..
Try that though and let me know how it works for you..

Reply With Quote
  #9  
Old December 18th, 2003, 03:49 PM
pyc pyc is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 3 pyc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Re: Problem continued....

Quote:
And see if that works
For my setup, I actually have a hosting directory (for the sites that I host) and a htdocs directory where my main site is located..
Try that though and let me know how it works for you.. [/B]


I already said: the problem was in the right order of domains listed in directive: you must put subdomains first...

pyc

Reply With Quote
  #10  
Old August 9th, 2007, 01:59 AM
hine hine is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 2 hine User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 21 sec
Reputation Power: 0
I have similar problem too...

1) I can't look any subdirectory
2) I can use Index.HTML, bu I can't use Index.ASP

How can I set, that I can use Index.ASP instead Index.html!


Regards!

Hine

Reply With Quote
  #11  
Old August 9th, 2007, 03:56 PM
Nilpo's Avatar
Nilpo Nilpo is offline
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Location: Near Dev Articles Headquarters
Posts: 122 Nilpo User rank is Private First Class (20 - 50 Reputation Level)Nilpo User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1Folding Points: 171032 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 11 h 37 m 59 sec
Reputation Power: 2
Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
Quote:
Originally Posted by hine
I have similar problem too...

1) I can't look any subdirectory
2) I can use Index.HTML, bu I can't use Index.ASP

How can I set, that I can use Index.ASP instead Index.html!


Regards!

Hine
Please start a new thread describing your problem. Thank you.
__________________
Click the image if at any point you don't like my decision.

Ask the Windows Guru!


Reply With Quote
  #12  
Old September 22nd, 2007, 06:05 AM
raananschwartz raananschwartz is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2007
Posts: 1 raananschwartz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 m 12 sec
Reputation Power: 0
i gave up

i will get bizz in somthing else.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Apache VirtualHost Problem!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed