LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Complete newbie to linux and websites (https://www.linuxquestions.org/questions/linux-newbie-8/complete-newbie-to-linux-and-websites-491416/)

NTCMCSE 10-11-2006 08:38 AM

Complete newbie to linux and websites
 
Hey guys I have a silly question and i hope i can get some help with it. I worked in a completely microsoft environment before and now have come to a job with some linux servers. In the past i have edited websites and just FTP's the info back up to the host. Now i am the host and there doesnt appear to be an FTP setup. At least not that i can find. How do i pull the files down edit them and then put them back up. Mind you I need to get the files onto my microsoft PC to edit them because i have no idea how to do that in linux land Thanks for any help at all

Nylex 10-11-2006 09:09 AM

So, you're running a webserver on your machine and want to know where the pages go? It's a bit confusing when you say, "I am the host" (which is why I'm assuming the server is on your machine), but then you talk about FTP (which obviously you don't need if the server is local). Can you please explain?

As for editing files.. with a text editor?

NTCMCSE 10-11-2006 09:12 AM

ok so the linux server is right here next to me and connected to my KVM when i connect to it it just says something like www@root and thats it. I need to just change a few links on the home page and then im done. Its a crappy website that a supplier requires us to maintain to sell their products The rest of our sites are managed elsewhere THANK GOODNESS lol ok so how do I findthe files...open them in an editor and then edit them? there is only 1 page its the home page. ALl the links on the page take you to other sites but i need to modify what sites they do to .

Nylex 10-11-2006 09:31 AM

If you type "ls" (without quotes) at the prompt, you'll see the files in the current directory. You may not be in the directory in which the files are located. Where the files are located will depend on your server's configuration. Hence, you'll need to look at the config file for the webserver. For Apache, this is called something like "httpd.conf", located in /etc/apache. I think there's a DocumentRoot directive in that file and the directory that follows it is where the files should go.

One location you might want to check is /var/www, I think it's common to put things in there. Change directory to /var by issuing "cd /var" (without quotes as usual). Then run "ls" to check if there's a www directory. If there is, you can cd to it (as you did to get to /var) and then list the files with ls.

For opening files with a text editor, you just put the name of the editor followed by the file you want to open, e.g. "emacs index.html" will open index.html in Emacs. Obviously that only works if the file is located in the current working directory, otherwise you'll need to use the full path to the file. There are other editors too - vi for example. Obviously I can't say which are installed on your system!

Seagull 10-11-2006 09:32 AM

What is the distro on the linux box?

michux 10-11-2006 09:52 AM

NTCMCSE -- the easiest way to connect to a Linux box from Windows is by using an SCP client (it's similar to FTP, but secure). Dowanload a program called "WinSCP" and connect to your Linux box just as if it was running an FTP server. Then, you can just edit your files in Windows as usual.

The only problem would be if the Linux box doesn't have an openssh server running. If that is the case, let us know and we'll tell you how to install it (it's easy).

Good luck!

Nylex 10-11-2006 09:57 AM

You could just use SSH and edit the files there..


All times are GMT -5. The time now is 03:51 AM.