Basic setup of a multi user hosting environment on Ubuntu or Debian.
This is a very simple, minimal and safe setup which allows users to have their own web sites hosted in a central web server. The main advantage of this method is that it is very secure.The main features of this setup are the following:
- Each user has his own home directory
- Each user can have one or more websites hosted
- Web server does not need extra configuration regarding users, groups etc.
- Users are owners of their website(s) and can connect and modify their sites at will.
- Users can only view the web directories that they own.
- Simple and fast setup
Steps
- Login as root
- Create user with his own home dir
- Assign a password to the user
- Create virtual host's directory and set permission to user and group.
- Change ownership of vhost directory
- Add apache user www-data to user's group
- Check the groups that the user www-data belongs to:
- Create virtual host or virtual directory apache configration
- Virtual directory setup
- Virtual host setup. Let's assume <site> is example.com. A sample config virtual host config could be similar to the configuration below:
- Reload/Restart apache
- Ready!
sudo su -
useradd -s /bin/bash -m -d /home/<username> <username>
passwd <username>
mkdir -m o-rwx /var/vhosts/<site>
chown -R <username>:<username> /var/vhosts/<site>
usermod -a -G <username> www-dataThe statement above gives apache web server the required permissions in order to run effectively all of the user's websites.
root# groups www-data www-data : www-data <username> ...
Alias /<subsite> /var/vhosts/<site> <Directory /var/vhosts/<site> Options None AllowOverride All Order allow,deny Allow from all </Directory>
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/vhosts/example.com ServerName www.example.com <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/vhosts/example.com> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> CustomLog ${APACHE_LOG_DIR}/example.com.access.log combined ErrorLog ${APACHE_LOG_DIR}/example.com.error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn </VirtualHost>
service apache2 reloadIn case reload doesn't work (although it should) try restart:
service apache2 restart
This comment has been removed by a blog administrator.
ReplyDeleteOurlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download Now
Delete>>>>> Download Full
Ourlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download LINK
>>>>> Download Now
Ourlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download Full
>>>>> Download LINK 7Q
This comment has been removed by a blog administrator.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for the guide!
ReplyDeleteI prefer to use Web Hosting Services but this was pretty useful
Hi,
ReplyDeleteThanks for sharing a very interesting article about How-to: Setup apache for a multi user shared hosting environment. This is very useful information for online blog review readers. Keep it up such a nice posting like this.
Regards,
WondersMind,
Best Web Design Company in Bangalore
I was very impressed by this post, this site has always been pleasant news Thank you very much for such an interesting post, and I meet them more often then I visited this site. Shared Hosting
ReplyDeleteAll the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks
ReplyDeleteddos protected hosting
Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.
ReplyDeleteour speed
Great post, and great website. Thanks for the information! start a business make money online
ReplyDeleteThanks for taking the time to discuss this, I feel strongly that love and read more on this topic. If possible, such as gain knowledge, would you mind updating your blog with additional information? It is very useful for me. Pressure Cleaning Services
ReplyDeleteYou know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! power washing services
ReplyDeleteMost of the time I don’t make comments on websites, but I'd like to say that this article really forced me to do so. Really nice post! industrial pressure washing
ReplyDeleteThis was really an interesting topic and I kinda agree with what you have mentioned here! wichita jewelry
ReplyDeleteYes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!THANKS!!!!!! How-To Do a Successful Product Launch on Your Website
ReplyDeleteI learn some new stuff from it too, thanks for sharing your information. Agen Slot Online
ReplyDeleteAs claimed by Stanford Medical, It's indeed the SINGLE reason women in this country live 10 years more and weigh an average of 19 kilos less than we do.
ReplyDelete(And realistically, it is not about genetics or some secret-exercise and absolutely EVERYTHING to do with "how" they eat.)
P.S, I said "HOW", and not "WHAT"...
Click this link to determine if this easy test can help you find out your true weight loss potential
Starting a new business can be a challenge with many obstacles to overcome. Having a set of goals can help you focus so you can be successful in launching your new company. GemmasTreasure.com
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. Web Hosting
ReplyDeletesdsdsdss
ReplyDeleteI loved your post.Much thanks again. Fantastic.
ReplyDeletelinux training
Shared hosting has been a popular and affordable choice. See expert reviews of the Best Cheap Web Hosting Services" based on pricing, value, uptime, and more.
ReplyDeleteOurlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download Now
ReplyDelete>>>>> Download Full
Ourlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download LINK
>>>>> Download Now
Ourlife01: How-To: Setup Apache For A Multi User Shared Hosting Environment >>>>> Download Full
>>>>> Download LINK