Find the answer to your Linux question:
Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 38
Originally Posted by Silman The CentOS box has a browser on in (Since i am using the desktop install untill i have a good grasp of whats going on), but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,483

    Quote Originally Posted by Silman View Post
    The CentOS box has a browser on in (Since i am using the desktop install untill i have a good grasp of whats going on), but my windows laptop also has a browser. Would they both be equally good clients?
    That's a good development setup.


    Quote Originally Posted by Silman View Post
    i can't see it being very difficult to troubleshoot. I will post back when i'm home.
    It was simple but escapes me at the moment.

    Quote Originally Posted by Silman View Post
    Thanks again for the help!
    No worries

    Edit: Just found this which is ringing bells.

    Edit 2: Apparently the index.html should be in /var/www/html/ in Centos.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  2. #12
    Just Joined!
    Join Date
    May 2012
    Posts
    96
    YES THAT WORKS!

    I can see the website when i got to silman.dev in my CentOS browser and when i got to server.silmanserver.com as per my host file setup

    Now how do i proceed?

  3. #13
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Silman View Post
    EDIT: When i make index.html in /var/www/ and write that html code and save it I try going to silman.dev (it has been added to my hosts) but all that comes up is some "Apache 2 Test Page powered by CentOS" thing
    per your DocumentRoot, you want to put that index.html file in the directory /var/www/html/, not /var/www.

    Edit: ah, you got it - never mind!
    Last edited by atreyu; 06-06-2012 at 03:28 AM. Reason: never mind

  4. #14
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Silman View Post
    Now how do i proceed?
    That depends - what do you want to do next?

  5. #15
    Just Joined!
    Join Date
    May 2012
    Posts
    96
    My goal is get this thing going so i can access it from other machines and upload code that i write from my laptop to it. Secondly, i want to get this thing on the world wide web so I - or anyone else - can access it from any computer.

    Then i just have a huge bunch of learning that i plan to do over summer. My sequence is going to be HTML, CSS, PHP, MySQL, Apache, Javascript, and possibly Ajax. I want to make this website look nice and also function correctly. My goal is to learn to make a website where people can register for their own accounts and make profiles and stuff ( i assume that is a lot of PHP and MySQL work).

    So how do i proceed to make this thing on the word wide web?!

    (Side question: I have been reading a lot on the debate PHP vs Perl vs Python vs Ruby. I thought I was going on the PHP track - as per the P in LAMP - but i want to know why to use PHP over the others, is it solely performance? I know google and Youtube actually use python. Anyway PHP is a long way down the road, i still need HTML and CSS under my belt.)

    thanks for the info guys, you guys have been geat!

  6. #16
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Silman View Post
    My goal is get this thing going so i can access it from other machines and upload code that i write from my laptop to it.
    you should be able to access your CentOS webserver, from other machines on your local LAN (like your windows PC) now. they should be able to browse to it using that local ip address. you could also add a a local host entry on the clients so that they could resolve the Linux box using a hostname.

    As for uploading code to it, all you need to do is use a file copying mechanism like scp (or SFTP or FTP) to copy your code to the DocumentRoot of your webserver. You said you have WinSCP, that is perfect. Have you tried using it to copy a file to your CentOS box, then view it?

    One word of caution if you are editing files on Windows, then sending them to a Linux server: you need to remove carriage returns that Window inserts. This is particularly important when you get into script writing. it doesn't matter as much w/plain text HTML. Scripts will barf in Linux if they have that carriage return.

    There are two solutions: the first (and better) one is to use a savvy editor in Windows, like Notepad++. You can configure it to write files "for Unix", which means it does not insert the carriage return, just the line feed. You can still view it in Widows, it is just that Linux will be happier with it without the CR.

    The second solution is to use the dos2unix utility in Linux on the Windows-created file. Install it w/yum, if you don't have it:
    Code:
    yum install dos2unix
    Secondly, i want to get this thing on the world wide web so I - or anyone else - can access it from any computer.
    I would recommend starting off with a free DNS domain name, instead of something complicated like godaddy. you can get one at dyndns.org or no-ip.com. i'm pretty sure i mentioned one of these before (in another thread). it is easy, you sign up for free, associate your public ip address (it detects it for you), and pick a domain name: silman.dyndns.org, for example. the beauty is that anyone on the net can go to the URL http://silman.dyndns.org and it will point to the /var/www/html/ directory on your own CentOS server (provided that your router/firewall is allowing it).

    (Side question: I have been reading a lot on the debate PHP vs Perl vs Python vs Ruby. I thought I was going on the PHP track - as per the P in LAMP - but i want to know why to use PHP over the others, is it solely performance? I know google and Youtube actually use python. Anyway PHP is a long way down the road, i still need HTML and CSS under my belt.)
    i'm for Perl (the red-headed step-child of the "P" family in LAMP). it has been around forever and is not going away anytime soon. it is used a lot in system scripts as well as with web scripting (and GUIs, too, but it is not ideal there - but is good enough for me), so i use it for various different reasons and like not having to learn PHP or Python to do web stuff when I already know Perl. one place it excels at is text file manipulation. another is regular expressions. it also has a gi-normous 3rd party module repository (CPAN) which more than likely will have a module or two for your next project that will save you lots of time. i have no idea if it the most robust or efficient. it probably isn't, but I don't host myface or whatever.

  7. #17
    Just Joined!
    Join Date
    May 2012
    Posts
    96
    Quote Originally Posted by atreyu View Post
    you should be able to access your CentOS webserver, from other machines on your local LAN (like your windows PC) now. they should be able to browse to it using that local ip address. you could also add a a local host entry on the clients so that they could resolve the Linux box using a hostname.

    As for uploading code to it, all you need to do is use a file copying mechanism like scp (or SFTP or FTP) to copy your code to the DocumentRoot of your webserver. You said you have WinSCP, that is perfect. Have you tried using it to copy a file to your CentOS box, then view it?
    I see, i have WinSCP so ill give that a try.

    Quote Originally Posted by atreyu View Post
    One word of caution if you are editing files on Windows, then sending them to a Linux server: you need to remove carriage returns that Window inserts. This is particularly important when you get into script writing. it doesn't matter as much w/plain text HTML. Scripts will barf in Linux if they have that carriage return.

    There are two solutions: the first (and better) one is to use a savvy editor in Windows, like Notepad++. You can configure it to write files "for Unix", which means it does not insert the carriage return, just the line feed. You can still view it in Widows, it is just that Linux will be happier with it without the CR.

    The second solution is to use the dos2unix utility in Linux on the Windows-created file. Install it w/yum, if you don't have it:
    Code:
    yum install dos2unix
    I already use Notepad++ in conjunction with WinSCP when for my Computer science class! Also i was going to install Ubuntu onto my laptop either this weekend or next so i will use that for writing scripts for my website after it do!

    Quote Originally Posted by atreyu View Post
    I would recommend starting off with a free DNS domain name, instead of something complicated like godaddy. you can get one at dyndns.org or no-ip.com. i'm pretty sure i mentioned one of these before (in another thread). it is easy, you sign up for free, associate your public ip address (it detects it for you), and pick a domain name: silman.dyndns.org, for example. the beauty is that anyone on the net can go to the URL http://silman.dyndns.org and it will point to the /var/www/html/ directory on your own CentOS server (provided that your router/firewall is allowing it).
    Do you think using a free DNS domain name will be less complicated than godaddy? I am eventually planning on having everything on my website silmanserver.com! But i can start off easy for now if you recommend it. I can also try to transfer my domain to a different registry if it would be better for setting the server up.

    Quote Originally Posted by atreyu View Post
    i'm for Perl (the red-headed step-child of the "P" family in LAMP). it has been around forever and is not going away anytime soon. it is used a lot in system scripts as well as with web scripting (and GUIs, too, but it is not ideal there - but is good enough for me), so i use it for various different reasons and like not having to learn PHP or Python to do web stuff when I already know Perl. one place it excels at is text file manipulation. another is regular expressions. it also has a gi-normous 3rd party module repository (CPAN) which more than likely will have a module or two for your next project that will save you lots of time. i have no idea if it the most robust or efficient. it probably isn't, but I don't host myface or whatever.
    Thanks for the insight! i am gonna keep reading into the debate on this issue. I already know python so it wouldnt be terrible but i like the idea of using PHP since it was developed for web scripting, but only time and research (and dabbing into stuff) will tell!

  8. #18
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Silman View Post
    Also i was going to install Ubuntu onto my laptop either this weekend or next so i will use that for writing scripts for my website after it do!
    yes, i omitted the best solution of all for dealing with CF/LF: ditch Windows for Linux!
    Do you think using a free DNS domain name will be less complicated than godaddy?
    No, I KNOW it is less complicated! seriously, you could be hosting it by now. the DNS records are updated almost instantaneously.
    I am eventually planning on having everything on my website silmanserver.com! But i can start off easy for now if you recommend it. I can also try to transfer my domain to a different registry if it would be better for setting the server up.
    so you already have the domain name (silmanserver.com), but you haven't decided on a hosting provider yet? well, i can't help you there, maybe someone w/experience w/one of them will chime in.

    I already know python so it wouldnt be terrible but i like the idea of using PHP since it was developed for web scripting, but only time and research (and dabbing into stuff) will tell!
    that is right: (time+dabbling)*caffeine=knowledge=power!

  9. #19
    Just Joined!
    Join Date
    May 2012
    Posts
    96
    Quote Originally Posted by atreyu View Post
    yes, i omitted the best solution of all for dealing with CF/LF: ditch Windows for Linux!
    Side question: what is CF/LF?

    Quote Originally Posted by atreyu View Post
    so you already have the domain name (silmanserver.com), but you haven't decided on a hosting provider yet? well, i can't help you there, maybe someone w/experience w/one of them will chime in.
    Well, I thought that by having a server at home i wouldn't have to pay for hosting from a company. I thought that when you buy hosting you are essentially renting a server (or part of a server) and using it instead of a home server. Are you suggesting that by having this CentOS box i still cannot escape having to buy online web hosting?

  10. #20
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by Silman View Post
    Side question: what is CF/LF?
    Carriage Return / Line Feed

    Well, I thought that by having a server at home i wouldn't have to pay for hosting from a company. I thought that when you buy hosting you are essentially renting a server (or part of a server) and using it instead of a home server. Are you suggesting that by having this CentOS box i still cannot escape having to buy online web hosting?
    you don't have to pay godaddy or anyone else a dime to have a publicly available webserver - that is a fact. however, if you purchased a domain name, you need to have your domain name registered to an IP address. if you bought that silman domain name from a registrar already, i'd guess you could do it (or already did it) thru them. at any rate, the DNS records for your domain name need to point to your public ip address, if you want to run the webserver a la your own crib. i'm not sure the best way to do it, though - i've never purchased a domain name myself.

    however, if you want tons of storage, automated backups, 24/7 reliable up-time, fancy shmancy web control panels, etc., you could pay godaddy or the like. in that case, silman.com or whatever would point to a webserver hosted by godaddy and your local webserver would have nothing to do with your website (except as a coding/testing platform). another nice feature of using a hosting company is that they won't change your public IP address on you, like your ISP will, which can cause (brief and infrequent, hopefully) site outages.

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Posting Permissions

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