Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I’m new into this, but usually I find all the information I need by a quick search on the net. But not with this one.
I have linked my domain to an Amazon Ubuntu instance. I have also installed MySQL, Apache2 and php (not yet sure if php was installed correctly).
So Apache says that index page is located at /var/www/html/index.html
And the start page through the ssh if /home/ubuntu. I suppose that I see the same page in ftp. And it is empty.
So I don’t really understand how they are connected together. Is home folder located in the same directory with var?
I can navigate to /var/www/html in ssh, but it could be easier to see the all folders in ftp to understand file system better and to upload files to this folder.
How this file system I built up? Could anyone help?
You can set up a new virtualhost in a Apache and set the Document Root to /home/ubuntu and in this way all files related to the new created virtualhost will be in /home/ubuntu. The correct way to do it is to use apache2-mpm-itk apache module and run each virtualhost in a different user context. This way you can set website document root to user's home directory and be able to modify files through ftp.
Try to read apache documentation regarding virtualhosts and mpm-itk module. Also take a look into linux file permissions documentation.
In addition to the standard location for the Apache Document Root that you now have, you can also configure Apache to use a user /home directory by enabling userdir in Apache as explained at the link below, for Ubuntu 18.04. Not sure if it varies for other Ubuntu distributions and you don't indicate which you are using. This would work as would the VirtualHost option but I don't know what will work in your "Amzaon Ubuntu instance" as that would depend upon what access control you have.
This is what I ment, both folders are located in the root directory.
Quote:
Originally Posted by yancek
In addition to the standard location for the Apache Document Root that you now have, you can also configure Apache to use a user /home directory by enabling userdir in Apache
Thank you for this info.
I was trying to set up 18.04, but things got messed up already at installing mySQL. Then i have started over on 16.04.
I have followed this guide. What shall i do to redirect this to the front page?
I see that in last guide they use home/user/public_html to place index.html at. Is it any guide that shows the best way to place different parts of the web site at home/user to do it property from the start.
The very high-level summary is that, in *nix systems, files are put in directories according to their function, whereas in DOS/Windows, they are put in directories by program name. Of course, this is grossly over-simplified (think of the System32 and SysWOW64 directories, for example)
Nr 1. is a very basic question; you are asking us how to set up a server.
please read some tutorials (apache and ubuntu, i'm sure digitalocean has something relevant to offer) and read documentation.
Chances are, by the time you understand more, you can also answer Nr. 2.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.