Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: uploading files to LAMP on UBUNTU Desktop

  1. #21
    Join Date
    Oct 2012
    Beans
    16

    Re: uploading files to LAMP on UBUNTU Desktop

    Everything seems to be working very nicely thanks to your patience and dedication. I was able to use Filezilla to copy a number of files to the UBUNTU server and do all the tricks with them.

    I do have a couple of questions though.

    I set up “rgc” as the “testuser” in the example that you provided. I’m curious if I would do any damage if I altered the /etc/passwd file to add the super user “ray” to be able to access the server? Not a necessity, just wondering.



    Code:
    ray:x:1001:1001:rgc,,,:/home/./ray:/bin/bash
    Also in Post 16 you mentioned:

    Note:
    after the changes you will loose phpmyadmin; a hurdle that we can take later. So don't panic
    Is there something special that I will need to do to be able to access the phpmyadmin utility now?

    My education in making this all work has taken a long path and I am thrilled to be able to have a local developmental server available to play with.

    Now I just have to figure out how to set up Dreamweaver so that I can have it copy my work to the LAMP server. I’m not there yet.

  2. #22
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: uploading files to LAMP on UBUNTU Desktop

    You should be able to use your user 'ray' in ftp. But 'ray' will be locked to his home directory so can not access the files of user 'rgc'.

    With regards to phpadmin, I assume that that is still installed in /var/www and therefore no longer accessible.

    What I suggest is to configure (another) virtual hosts. To do so, make a copy of your /etc/apache2/sites-available/default

    Code:
    sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/phpmyadmin
    Next modify the phpmyadmin file that you just created. The below example is based on the very original default file, not the one you modified.

    Code:
    <VirtualHost *:80>
    	ServerAdmin webmaster@localhost
    
    	ServerName phpmyadmin
    	DocumentRoot /var/www/phpmyadmin
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/phpmyadmin/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /var/log/apache2/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /var/log/apache2/access.log combined
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    </VirtualHost>
    You also need to create an entry in /etc/hosts for this new website; add the red line below. You need root privileges to edit the file.

    Code:
    127.0.0.1	localhost
    127.0.1.1	wim-desktop
    127.0.0.1	phpmyadmin
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Next issue the following 2 commands; the first one enables the new site on your system and the second one is obvious (I guess)
    Code:
    sudo a2ensite phpmyadmin
    sudo service apache2 restart
    Next you can use a browser to access the sites
    http://localhost will give you the site that we created earlier (in your home directory)
    http://phpmyadmin will give you phpmyadmin located in /var/www/phpmyadmin.

    PS
    Virtual hosts is the normal way to allow one webserver to serve different websites (including different domains and subdomains).
    Last edited by Wim Sturkenboom; October 24th, 2012 at 12:00 PM. Reason: added PS
    If you don't make backups of your important data, your data is obviously not important to you.

  3. #23
    Join Date
    Oct 2012
    Beans
    16

    Re: uploading files to LAMP on UBUNTU Desktop

    Sorry for the delay in responding. Sometimes life gets in the way. Everything is behaving according to plan now. I appreciate all that you have done for me.

    I have one last question and this may not be the place for it but it is on the same theme. Sort of.

    I notice that sometimes when searching the Internet for documents, I will get a Directory listing of files and folders instead of an error message such as “File not found” is this a setting on the server?

    Now I will figure out how to set this as “Solved”. It has been a long haul but I am a bit smarter now. Thanks.

  4. #24
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: uploading files to LAMP on UBUNTU Desktop

    It was a pleasure.

    I notice that sometimes when searching the Internet for documents, I will get a Directory listing of files and folders instead of an error message such as “File not found” is this a setting on the server?
    You have to elaborate a bit on what you exactly mean, but I guess it's a setting on the server or a dedicated error page that gives a directory listing

    It might however be outside my league. There is a dedicated server section ( http://ubuntuforums.org/forumdisplay.php?f=339 ) where your question might fit better. This thread was also started as a thread about uploading, so the title no longer covers the content and therefore might not attract the right people to answer

    Good luck
    If you don't make backups of your important data, your data is obviously not important to you.

  5. #25
    Join Date
    Oct 2012
    Beans
    16

    Re: uploading files to LAMP on UBUNTU Desktop

    Just when I thought that everything was well in my world, I discovered another impediment to my progress. It seems that Apache2 needs to have rights to create a file in my working folders. And I suspect that it would also require rights to create a temp file wherever that should happen. I haven’t figured out where that is yet since I have not been able to create one. As always any ideas would be greatly appreciated, and thanks in advance.

  6. #26
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: uploading files to LAMP on UBUNTU Desktop

    I was wondering when that question was coming In post #20 I gave a possible solution with setfacl.

    For your setup, a simple chgrp might be easier to give write access.

    Code:
    wim@i3-2120:~$ ls -ld testdir/
    drwxrwxr-x 2 wim wim 4096 Nov  1 17:49 testdir/
    wim@i3-2120:~$ sudo chgrp www-data testdir/
    [sudo] password for wim: 
    wim@i3-2120:~$ ls -ld testdir/
    drwxrwxr-x 2 wim www-data 4096 Nov  1 17:49 testdir/
    wim@i3-2120:~$
    Replace testdir with the path to the document root. Make sure the group's permissions are rwx.

    I'm not sure if this will take care of temporary files, but I have not had problems on my Slackware server with temporary files.
    Last edited by Wim Sturkenboom; November 1st, 2012 at 05:21 PM.
    If you don't make backups of your important data, your data is obviously not important to you.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •