Enable the http server in a Linux machine
Now restart the service using the command:
If you want to get a file "sample.txt" from "/var/www/html" folder, use the following command:
2) "/var/www/html" is the default location where the files are stored.
To change this location, go to file "/etc/httpd/conf/httpd.conf" and look for "DocumentRoot" and change this "/var/www/html" to "/home/user/" and then restart the httpd service, now you can download files from "/home/user"
e.g. To download a file with name "sample.tgz", use
Go to, vim /etc/httpd/conf/httpd.conf (In Redhat)
Look for "Listen X.X.X.X:80", remove the # mark before it and change it to "0.0.0.0:80"Now restart the service using the command:
service httpd restart
Not go to some Client machine, which is directly reachable from the Server. And you can get files from the server using the command:If you want to get a file "sample.txt" from "/var/www/html" folder, use the following command:
wget ftp://USER:PASSWORD@192.168.10.11://file.txt
1) Provided the Server is reachable with IP 192.168.10.11 and user credentials as "USER", password as "PASSWORD".2) "/var/www/html" is the default location where the files are stored.
To change this location, go to file "/etc/httpd/conf/httpd.conf" and look for "DocumentRoot" and change this "/var/www/html" to "/home/user/" and then restart the httpd service, now you can download files from "/home/user"
e.g. To download a file with name "sample.tgz", use