logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Using Userdir without users
Author
markwow



Joined: 31 Dec 2012
Posts: 2
Location: US, Detriot

PostPosted: Mon 31 Dec '12 12:53    Post subject: Using Userdir without users Reply with quote

- Apache version 2.2
- operating system Ubuntu

I know the title sounds crazy, but I think I have tried everything else and userdir would work the best and is essentially what I am looking for. So basically I want be able to view all the folders in the /var/[folders]/www the problem here is that only one of the folders in there is a user. This user is called server. So when I go to http://myipaddress/~server I can view the files and its all fine, but I want to be able to go to http://myipaddress/~mark which would be /var/mark/www but "mark" is not a user. So I just get a 404 page not found error. I will go ahead and get to my questions now, my first question is, could I make this work? Then if that answer is a no, what should I be doing to get the job done?

Thank you in advance for your help! Very Happy
Back to top
markwow



Joined: 31 Dec 2012
Posts: 2
Location: US, Detriot

PostPosted: Tue 01 Jan '13 2:01    Post subject: Problem solved. Reply with quote

I figured it out. If anyone else needs the solution here is how I did it:

Code:

# Add Alias for DNS-Less Previews
<VirtualHost *:80>
ServerName IPADDRESSHERE
DocumentRoot /etc/www/
AliasMatch ^/~([a-zA-Z0-9]+)/?(.*) /var/hostdata/$1/public_html/$2
<Directory /var/hostdata>
Options FollowSymLinks Indexes
AllowOverride All
Order Allow,Deny
Allow from all
DirectoryIndex index.php
   <IfModule mod_php5.c>
      AddType application/x-httpd-php .php
      php_flag magic_quotes_gpc Off
      php_flag track_vars On
      php_flag register_globals Off
      php_admin_value upload_tmp_dir /var/temp
   </IfModule>
</Directory>
</virtualhost>
Back to top


Reply to topic   Topic: Using Userdir without users View previous topic :: View next topic
Post new topic   Forum Index -> Apache