Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Apache 2.X
Index -> Graphics and Design, Web Design -> (X)HTML Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Blade




PostPosted: Fri Apr 25, 2003 7:38 am   Post subject: Apache 2.X

also, about apache servers.... (their help file really sucks)... how can i make the user account a subdomain (from someserv.com/~user to user.someserv.com)
Sponsor
Sponsor
Sponsor
sponsor
octopi




PostPosted: Fri Apr 25, 2003 6:26 pm   Post subject: (No subject)

do you have complete access to someserv.com?
If yes, then its easy, if not then your SOL
make sure that *.someserv.com will goto the same place www.someserv.com does.

-then you can install perl, and download a free program called
True Virtual and use it
https://userfriendly.com/customprogramming/shop/categories/viewitem/tpath/primary/category/CGI_Scripts/id/0001


-Or you can use apache to do it for you.
#add this to your httpd.conf file
UseCanonicalName Off
VirtualDocumentRoot /usr/local/www/data/%1
#you will need to change the directory, and do a little bit of fidling
#it will make www.someserv.com goto /usr/local/www/data/www/
#and user4.someserv.com goto /usr/local/www/data/user4/

Thats a start.
Homer_simpson




PostPosted: Fri Apr 25, 2003 6:46 pm   Post subject: (No subject)

ofcourse it will
go sign up at http://vze.com
they'll give u a free subdomain address to give to ur existing website but u need to put a link to their website in your pages though but it's worth it
Blade




PostPosted: Fri Apr 25, 2003 6:47 pm   Post subject: (No subject)

thanks a lot man... yea the serv is on my comp, but the thing is i have my shared files on a different drive... apache is installed on D:\ and i have my shared files in c:\shared and the user folders are in c:\sites

oh, and another thing... how can i find out my server path... you say /usr/local/ and i dont see those folders anywhere in the apache directory.... Confused oh, and incase it matters, iam running WinXP Pro
octopi




PostPosted: Fri Apr 25, 2003 8:41 pm   Post subject: (No subject)

Okay, i just installed the win32 version (I mainly use unix)

you will need to add this to your httpd.conf file

#
LoadModule vhost_alias_module modules/mod_vhost_alias.so
UseCanonicalName Off
VirtualDocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs/%1"
#

Thats what I used, now inside the htdocs directory you would make a seperate directory for each USER.domainname.com
You can change the location above to point to where all your user directories already are.

You will need to make a directory named
www this is what will display when you call WWW.somedomain.com
and also in the main directory you need to make a copy of what you put inside the www directory (so that if people access your site as somedomain.com they will get the same thing)
In unix you could make a symlink so that the www dir just points back to the main dir, but I don't think you can in windows.

Yeah, as I said before, make sure wildcarding is on for your domain, if you have direct access to your dns records then just add a wildcard record.

If not email your dns provider and ask them, or you might be lucky and it might already be enabled.


I don't know what you meant by shared files....but....
You would probally use \/ if you keep your user directories in C:/sites/

#
LoadModule vhost_alias_module modules/mod_vhost_alias.so
UseCanonicalName Off
VirtualDocumentRoot "C:/sites/%1"
#


Good luck.
Blade




PostPosted: Fri Apr 25, 2003 10:09 pm   Post subject: (No subject)

sweet, it works thanks so much for your help man Smile greatly appretiate it.. the only thing i cant get is it to display the main files without www.
octopi




PostPosted: Fri Apr 25, 2003 11:16 pm   Post subject: (No subject)

Um, well on windows the only way I think you can do it is, to copy everything in the WWW directory into the C:/sites/ directory.

(windows sucks, cause you can't link two directorys together like on unix)

So you will end up having two seperate locations that contain the exact same files.
Blade




PostPosted: Sat Apr 26, 2003 9:17 am   Post subject: (No subject)

for some reason it still comes up as page cannot be found, it should give a directory listing.. shouldnt it?
Sponsor
Sponsor
Sponsor
sponsor
octopi




PostPosted: Sat Apr 26, 2003 12:29 pm   Post subject: (No subject)

Well, goto that site (yours, the one that makes the error)

And then check your error log, it should say something like:

code:
[Fri Apr 25 21:11:11 2003] [error] [client 127.0.0.1] File does not exist: C:/sites/



Or something, that will tell you where the server is looking for the files to be.
(make sure to check the date/time to be the same as your clock, so you are looking at the right entry.)

Hope that helps.
Blade




PostPosted: Sun Apr 27, 2003 2:30 am   Post subject: (No subject)

Quote:
The page cannot be found
The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

--------------------------------------------------------------------------------

Please try the following:

If you typed the page address in the Address bar, make sure that it is spelled correctly.

Open the localhost home page, and then look for links to the information you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.



HTTP 404 - File not found
Internet Explorer

thats the error i get.... i think there something in my httpd.conf file that i'm missing.... because if i comment the virtual document root, and i just use the normal docuent root... it works fine.... **shrugs sholders**... you should know more than i do though Wink
octopi




PostPosted: Sun Apr 27, 2003 8:41 am   Post subject: (No subject)

Like I said before, look in your error log files, its very helpful,
I have the same problem when accessing my server via localhost, solution:

code:
[Sun Apr 27 09:14:09 2003] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/localhost


Well the above tells me that its looking for files in the localhost directory.,
So you will need to make yet another directory.
C:\Sites\localhost

in that put the same stuff you put into www

all should work.


why this happens?
the VirtualDoc.... thing takes a look at the host name the web browser sends the server- example www.yahoo.com
now when we use
code:
VirtualDocumentRoot "C:/sites/%1"
'
the server takes the 1st part of the site (WWW.yahoo.com) and looks for a directory named
C:/sites/www/

when you just enter yahoo.com the webserver recognizes its a domain name and gets the files from
C:/sites/ instead.

but now when you enter localhost, it can't detect that as a domain name, and so it just takes the first part of it (which is the only part - localhost) and it looks for the files to serve in the
C:/sites/localhost/
directory.

Understand so far?
Hope that helps.
Blade




PostPosted: Sun Apr 27, 2003 11:28 am   Post subject: (No subject)

Quote:
[Sat Apr 26 10:02:13 2003] [error] [client 65.93.70.8] File does not exist: C:/sites/blademan


yea i got it... hehe,thx.. it made more sense when you said it looks for the first part.... blademan... i was just using no-ip.com as my dns, and it works pretty well lol... cuz i'm cheap Very Happy
octopi




PostPosted: Wed Apr 30, 2003 10:39 pm   Post subject: (No subject)

Let me know if you have any more problems Very Happy
Blade




PostPosted: Thu May 01, 2003 11:38 am   Post subject: (No subject)

okie, thx alot man.. really appreate it
JSBN




PostPosted: Mon May 05, 2003 12:17 pm   Post subject: (No subject)

Whoever helps me get's 50 bits
I am having trouble getting a .htpasswd file to work with a .htaccess file. I am not at home so i cant put the contents up right now, but i will later, is there anything that must be enabled the cofig files for apache, fo it to work?
(Expect the code for the file @ approx. 6-8pm EST)
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 30 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: