ProFtpd Homedirectory per user - apache

I So new to linux Ubuntu and moving from windows.
The problem I have is related to ftp. This is what I am trying to do.
My websites are located in /var/www. Each website has its own root for examle
/var/www/site1
/var/www/site2
This is what I am trying to do. I would like to have a user for each site (directory) so they can access their home directory through ftp.
Looks so easy, but can't make it work. Any help or direction is appreciated.

If you want a user per site you might need to create virtual hosts in apache so that instead of the sites being located in /var/www they will be located in the user's home directory.
You can then allow users to access their home folders via ftp. These are instructions that are available on the Ubuntu site. Access them here
alternatively you can add the users as FTP users with the right permissions to the folders located under /var/www/ . Documented well in the ProFTPd website.
There's an old post here that you might still find helpful

Related

Different virtual hosts for same website but different pages

My web server directory is as follows:
var/www/html/site-part-1
var/www/html/site-part-2
In site-part-1, I have a wordpress installation, and when a person lands on my site by google organic / direct whatever when they type in the domain into addres bar it will take user to site-part-1
Currently site-part-1 is operational with the virtual host configuration directory root directory set to var/www/html/site-part-1
But I have a completely different system in site-part-2, that is built with python which I will be accessing via a link from the wordpress site.
example.com (site-part-1) will have a link, and it will take the user to my website example.com/my/directory and in /my/directory will be the contents of site-part-2
It may have worked sticking site-part-2 in the wordpress site folder but for cleanliness I put it into seperate folder
Does anyone know how I should go about setting up my apache settings so that both directories work together?

Cannot Locate .htaccess

Good morning team,
I need help, I'm in charge of a Web server CENTOS handling the web of my work is a little disorganized and access to the site is restricted by http, I need to add users so that they can authenticate to the site but I can not find the .htaccess file, I've tried everything [locate, find, updatedb, ls -a, etc ...] I need your help please.
Capture of the root folder of the portal:
root folder
Here a capture of the passwd file:
passwd file

How to exclude subdomain directory from main website

I've setup a VPS with apache2.
I am using cloudflare for DNS management.
Now, I have my websites's files in "var/www/website" folder. Inside that, there is another folder for forum. like "var/www/website/forum" inside which there are all forum related files.
Now, suppose I have www.website.com pointing to "var/www/website"
and I also have a subdomain forum.website.com pointing to "var/www/website/forum".
What I want to do is make the files inside "var/www/website/forum" accessible via subdomain only. I don't want users to access forum via www.website.com/forum, but I want them to access it only via "forum.website.com"
What you need to do is set up what's called a virtual host. You would put your forum at /var/www/forum and website at /var/www/website.
inside /etc/apache2/sites-available, you'll need to add an additional configuration file for that site called forum.website.com.conf.
You'll then need to create a symbolic link to /etc/apache2/sites-enabled for that file so that apache sees it. From there, you reboot the server and are good to go.
Here's some documentation:
http://httpd.apache.org/docs/2.2/vhosts/
http://httpd.apache.org/docs/2.2/vhosts/examples.html
https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
This may be a bit different depending on the flavor of linux, but should be about the same. Control panels like Cpanel, Plesk and WebMan can make this process a bit easier by abstracting the configuration to a web control panel.
Hope this helps you.

XAMPP: How to make apache webserver owner of folder /htdocs

I am using XAMPP and apache as webserver. I have permission problems with a website of mine that requires write access to a temporary folder in the project folder /htdocs/myProject/tmp
It think my problem is that my site runs on my localhost and I copied the project with my regular desktop user into the htdocs folder. Apache seems to lack write permissions.
My question is now: How do I found out which user group apache belongs to in order to make that group owner of the folder? That should fix my permission problem, shouldn't?
As far as I understand, the Apache (Webserver) has an own user called "www-data". Maybe an already answered question on SO has a solution, which you can use.
The used command relies on a linux-based system and that you navigated in a terminal to a directory, where /htdocs is located.
This command in the answer of the link below allows you as a humanoid user to write and work in this specified directory.
You add www-data (Apache) to use this directory, too.
New files of that chown'ed directory will 'inherit' the owners.
The Link and further descriptions can be found here on Stackoverflow.com:
www-data permissions

Finding Dropbox directory ubuntu

I have a dropbox account which sync all my website folders. and it works well on windows using my apache to test, because apache can find the directory. I have another development computer using Ubuntu 13, and i changed the document root in apache to /home/jacques/dropbox but it cant find the directory , so i opened my home folder. i saw the directory there, so i tried to access it using the terminal, it said that the directory doesnt exist.
I did right click dropbox and that said that the directory is in /home/dropbox and /home/jacques/dropbox
am i missing something important here ?
There are a few things to check here -
First is that on Ubuntu the default Dropbox directory is
/home/username/Dropbox not /home/username/dropbox. Note the capital
'D', linux file systems are case-sensitive. Make sure that you specify it with the capital D in the DocumentRoot declaration.
The second is to check what user Apache is running as and making
sure that it has permissions to view your Dropbox directory. On
Ubuntu, the default is www-data, so you might want to add yourself
to the www-data group and change the group on the Dropbox folder to
be www-data.
Alternatively, you can change the user and group that Apache runs as by editing the /etc/apache2/envvars file and by making
these edits:
export APACHE_RUN_USER=jacques
export APACHE_RUN_GROUP=jacques
You will need to restart Apache after this, and you may need to update the owner of the /var/log/apache2 directory to be you also.