Author Topic: Help with directories  (Read 3057 times)

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Help with directories
« on: November 17, 2011, 07:51:37 am »
I've just reinstalled ubuntu 10.04 on vmware after trying out proftpd and vsftpd.

What I want is a way to let people use FTP to upload to their own www directory and use http://ip/username to get to their website, and maybe try to use subdomains.

christian

  • Guest
Re: Help with directories
« Reply #1 on: November 17, 2011, 08:43:09 am »

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #2 on: November 17, 2011, 08:54:52 am »
does this help:
http://doc.zentyal.org/en/ftp.html  ???

No, that just tells you about FTP. I want to know how to combine the FTP with the web server so you can FTP in directly to the www folder with multiple www folders, one for each user, and locked into their own home directory.

Basically, like a regular web host server.

Instead of:
User1 - /var/www (website)
User1 - /home/user1 (FTP folder)

I'd want something like:
User1 - /home/user1/www (website)
User1 - /home/user1 (FTP folder)

User2 - /home/user2/www (website)
User2 - /home/user2 (FTP folder)



what would be the best package to do this with?
« Last Edit: November 17, 2011, 09:01:57 am by Siwon »

christian

  • Guest
Re: Help with directories
« Reply #3 on: November 17, 2011, 09:14:42 am »
You can still edit apache conf (sites-available) so that user's web site relies on /home/user...
I don't understand what the blocking point is?

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #4 on: November 17, 2011, 09:53:54 am »
How do you do that?

And what do you mean by blocking point? do you mean the locked in home directory? if so then the point of that is because it fixed the "Up to higher level directory" which lets every user access any folder they want. There may be a chmod to fix it but I'm new to linux so I'm just experimenting.

I was trying to do it with the sites-enabled before and it didn't do much.


I'm in sites-available right now, I can just duplicate the default to user1 and edit the DocumentRoot and directory and it will work?
« Last Edit: November 17, 2011, 09:58:13 am by Siwon »

christian

  • Guest
Re: Help with directories
« Reply #5 on: November 17, 2011, 10:11:01 am »
Start reading a bit of Apache documentation: site-enable is only a link to site-available. The one supposed to be changed is site-available.
my point with "blocking point" was (sorry for the confusion): I don't see was is preventing you to modify web server configuration to fit your needs.

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #6 on: November 17, 2011, 10:42:20 am »
Oh, well, it's just the fact that I'm new to this. I've ran servers on Windows using various programs but never with linux, let alone actually playing with linux. I have used a little of red hat about 6 years ago and that's it.

Never had to mess with the apache config, this is just something new that's for experience purposes.

Thanks for the help.

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #7 on: November 17, 2011, 11:28:18 am »
Well, unsuccessful so far.

I was following this guide:
http://linuxhelp.blogspot.com/2006/02/host-websites-on-your-local-machine.html

What I have is this

Users:
josh
nodda4me

Folders:
/home/josh
/home/josh/www
/home/nodda4me
/home/nodda4me/www

Files in /etc/apache2/sites-available:
default
default.ssl
josh
nodda4me

You can see a screen shot of both the josh and nodda4me files here:
http://yfhgaming.com/images/ubuntuconfig.png


My hosts file:
Code: [Select]
127.0.0.1 localhost
127.0.1.1 ubuntu.localdomain ubuntu


#What I Added
127.0.0.1 localhost.localdomain localhost josh nodda4me



The ubuntu vmware network IP to my computer:
192.168.137.128  ubuntu (computer name)


My Main Computer (hosting the vmware) hosts file
Code: [Select]
192.168.137.128 ubuntu
192.168.137.128 localhost
192.168.137.128 localhost.localdomain localhost josh nodda4me

All 3 of these load the page /var/www/index.html
http://ubuntu
http://josh
http://nodda4me

christian

  • Guest
Re: Help with directories
« Reply #8 on: November 17, 2011, 11:50:18 am »
I feel you mix-up different aspects. Just tell me if I'm wrong.

If you read Zentyal documentation, http://doc.zentyal.org/en/web.html#http-server-configuration-with-zentyal you will notice that URL for users web site is http://<zentyal>/~<user>/.
What you try to achieve is virtual host, which is different.
Since you can mix both and create virtual host for users  ;) but I would suggest to do it in Zentyal using virtual host feature.
You are not using Zentyal here for virtual host management, are you?
I though Apache config file for Zentyal created vhost was something like "ebos-vhost_namedomain" and not "vhost_name"
It looks like you just duplicated the default config file... strange...


Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #9 on: November 17, 2011, 11:55:56 am »
Yes, I did just duplicate the default and reconfigured the directories and names.

Yes, I am using Zentyal (for the first time), don't think I'm using Zentyal for virtual host management but then again I don't know what I'm doing.

I'll redo the server and see if the http://<ip>/<user> works, I didn't try that earlier, I just knew that the root directory was not a folder with subfolders "user1", "user2" and so on.



Can you tell me what to do after I install Zentyal?
« Last Edit: November 17, 2011, 11:58:17 am by Siwon »

christian

  • Guest
Re: Help with directories
« Reply #10 on: November 17, 2011, 12:00:49 pm »
You don't need to re-install Zentyal. Just keep it up and running.
You can first access users directory if your web server is configured to accept it (look at web server section) and (same place) you can create virtual hosts.

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #11 on: November 17, 2011, 12:04:50 pm »
I've already reinstalled Ubuntu server, almost have Zentyal up.

I'd rather start from scratch again anyways.

Siwon

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: Help with directories
« Reply #12 on: November 17, 2011, 12:25:15 pm »
Can you look at the page:

https://70.188.38.81
User: josh
Temp Password: 12345678
« Last Edit: November 17, 2011, 12:29:10 pm by Siwon »

christian

  • Guest
Re: Help with directories
« Reply #13 on: November 17, 2011, 01:47:11 pm »
Wow, quite dangerous!
Next time you need to do something like this, tell me before enabling it.
We can set up VPN, remote control or whatever that doesn't permit such public open access  :o

can you connect to IRC ?
« Last Edit: November 17, 2011, 01:48:57 pm by christian »

christian

  • Guest
Re: Help with directories
« Reply #14 on: November 17, 2011, 01:58:10 pm »
So, what I can see (because there is no specific question in your previous post):

- this server runs internally (there is a redirect or reverse proxy at your internet gateway level). BTW, real IP address is 192.168.137.128   ;)
- you are running services than can not be enabled (like DHCP for instance because Zentyal has only one interface that is DHCP client)
- it looks like you have removed FW rules or is it because there is only one interface?

what else  8)