Results 1 to 10 of 38
Hey there!
After a long and difficult troubleshoot with some people over in the newbie forum (special thanks to you guys, you know who you are ) I was finally ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-03-2012 #1Just Joined!
- Join Date
- May 2012
- Posts
- 96
Can't get server to work and wouldn't know how to use it anyway....
Hey there!
After a long and difficult troubleshoot with some people over in the newbie forum (special thanks to you guys, you know who you are
) I was finally able to finish this tutorial for setting up a server on CentOS.
My goal for the server is to host my own websites. I am currently in the process of learning HTML - afterwards i will be trying to learn CSS, Apache, MySQL, PHP, Javascript - and i want to be able to have my website grow as i learn more and more about web developing. But for the life of my I just can't seem to find a break with this server!
I am not sure everything installed correctly even though it seemed like everything was going pretty well. If you look on page 7 it tells you at the very end that you can now go to <my IP Address>:8080 to use ISPConfig to configure your new server but when i got to that address all i get is a blank page with this code on it:
I have posted in their forums but they have been pretty unresponsive and after the immense support i got in the newbie forum i feel not only more comfortable posting here but also feel like my problem will be resolved faster.Code:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Reason: You're speaking plain HTTP to an SSL-enabled server port.<br /> Instead use the HTTPS scheme to access this URL, please.<br /> <blockquote>Hint: <a href="https://server.silmanserver.com:8080/"><b>https://server.silmanserver.com:8080/</b></a></blockquote></p> </body></html>
My second problem is that even if this was working the way i wanted it to I still have no idea how to get my HTML code up on the server so it displays when i got to my website (i also need help making godaddy tell my domain names to be linked to my specific server).
My end goal for this server is for me to be able to write and test HTML, CSS, and other code on a laptop and upload it to the server so i can edit my website remotely (if this is too hard i can still write code on my CentOS box but i really wanted to be able to remotely upload code and other media to the server).
I'm sorry if this feels like i'm asking you guys to explain all of server administration to me, but i really want to learn this and get my problem fixed so i can get to uploading my website.
Note: If someone has a better guide for making a server on CentOS and thinks that completely restating from scratch is the best option then i am not terribly against just reinstalling CentOS from scratch and trying it over again. Right now i have the Desktop version because it was easiest for me to deal with and i was able to copy and paste outputs to from it to this forum easily instead of typing it up from my laptop that i'm on.
Thanks so much!
- 06-05-2012 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
man, that is a lot of stuff to be installed from the get-go. that is probably a good guide, but the short-side to it is i think that not enough time is spent focusing on one thing and getting it done, in a way that teaches the user about the process.
so have you tried to load the suggested link in a browser?I am not sure everything installed correctly even though it seemed like everything was going pretty well. If you look on page 7 it tells you at the very end that you can now go to <my IP Address>:8080 to use ISPConfig to configure your new server but when i got to that address all i get is a blank page with this code on it:
Code:<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> Reason: You're speaking plain HTTP to an SSL-enabled server port.<br /> Instead use the HTTPS scheme to access this URL, please.<br /> <blockquote>Hint: <a href="https://server.silmanserver.com:8080/"><b>https://server.silmanserver.com:8080/</b></a></blockquote></p> </body></html>
https://server.silmanserver.com:8080
note the https protocol at the beginning of the URL. that signifies Secure HTTP.
if that doesn't work, try:
http://localhost:80
also, check the apache error log:
/var/log/httpd/error_log
honestly, i know nothing about ISPConfig, it always seemed a bit bloaty to me.
copy the files to the document root of your web server. it is defined in the apache config file in a declarative DocumentRoot, and it typically:My second problem is that even if this was working the way i wanted it to I still have no idea how to get my HTML code up on the server so it displays when i got to my website
/var/www/html/
The apache config file is typically at /etc/httpd/conf/httpd.conf. if your webserver is being hosted by some provider, then you'll ftp/sftp the files there, once you've been given account information, or maybe use a browser upload tool provided by the web hosting service.
do u already have a godaddy account? they should have given you that kind of info when you signed up. you should be able to sign in at their website and have access to that kind of configuration - it should be fairly obvious, but who knows, maybe it isn't...(i also need help making godaddy tell my domain names to be linked to my specific server).
this is why i think stuff like ISPConfig and all that other stuff in the guide is overkill for what you want to do. all you need is apache, an editor (nedit, vim, etc.), and a browser.My end goal for this server is for me to be able to write and test HTML, CSS, and other code on a laptop and upload it to the server so i can edit my website remotely (if this is too hard i can still write code on my CentOS box but i really wanted to be able to remotely upload code and other media to the server).
i think i gave you an example of how to write an example HTML file and put it on your server in that previous thread you mentioned. but if you can't dig that up, try:
1. use your editor to create a file, call it:
2. in test.html, put:Code:/var/www/html/test.html
3. make sure apache is started:Code:<b>Hello!</b>
4. try to load the page in a browser (from the same machine):Code:service httpd restart
Edit: also, is server.silmanserver.com pointing to a public ip address, and you are behind a router? if so, you may have NAT/port-forwarding stuff to resolve, which is why starting with localhost instead of your public FQDN is a good idea. you can always sort out that later, it is a completely separate issue. if you are resolving server.silmanserver.com to a local ip address (like in /etc/hosts), then never mind about that.Code:firefox http://localhost/test.html
Last edited by atreyu; 06-05-2012 at 05:22 AM. Reason: DNS
- 06-05-2012 #3Just Joined!
- Join Date
- May 2012
- Posts
- 96
That https thing worked! I can even access the control panel from a different computer!
I am a bit confused when you talk about the root directory of the server and /var/www/http/
How does the server know which page is the homepage of the website?
I do have controls in GoDaddy to associate the domain name with a DNS Server but i don't know enough to configure it correctly (i really need like a manual or something, maybe a tutor that can teach me first hand what i'm doing with this server because so far i have just been following the guide and not knowing whats going on)
Thanks for reposting that example! I am trying to make it so i can write code from my laptop and upload it (along with media such as pictures, etc.) to the server so i can remotely work with my webpage.
I have no idea if server.silmanserver.com is pointing to a public IP address, i am such a noob with this that i have less than novice experience. what is FQDN? I am so confused.... I am sorry if i'm trying to ask you guys to teach me to be a web admin, but i feel like it shouldnt be this difficult to get a home server and simple webpage online.
If this tutorial is too much i can restart from scratch but my ultimate goal is to make a fluid, dynamic website that can integrate code that i write for it (i know thats thinking long term but thats what i want to learn eventually).
If you think ISPConfig is bloaty then what do you recommend? I know you said all i need is apache and a text editor but how do i turn that into a home server where i can edit webpages remotely?
I am currently not behind a router but this weekend i will try to get behind one since the general consensus in my newbie thread was that it is preferable
thanks for replying btw! You were so much help in my newbie thread, this is exactly why i posted here because of how supportive everyone is!.
- 06-05-2012 #4
The first thing is to tell the server that is called whatever your site is called. Assuming your site is called silman.dev, add an entry to your hosts file
As you are only doing one site at the moment, you shouldn't need to modify the Apache configuration. When you start working with multiple sites, you will use virtual hosts. A Debian based introduction to how I approach it. The main differences with CentOS will be configuration file names and locations.Code:ip-address silman.dev
You will need to add the name in the hosts file of any computer that you want to access your server from. Alternatively, you can set up a DNS server on your server and make sure that is the first DNS server used by the clients. It is probably simpler just to edit the host files.
The default document is usually called index.html but you can add others by modifying the Apache configuration. If you have installed PHP, then I think it will automatically set up index.php as a default also.
To upload your files, use scp which is secure copy and copies over ssh. You can use a GUI by opening your file manager on the client and going to the location ssh://server.name. On Windows, there is a piece of software called WinSCP.
Yes, it is a good idea to be behind a router
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 06-05-2012 #5Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
actually, i said /var/www/html, but that is just the default document root directory, on a non-virtual host. it is a good place to started testing. if you are doing your first example on your local server, and not pushing it to a webserver on goddaddy or something, then you can start using that directory. to know the directory for sure, you can do:
Code:grep ^DocumentRoot /etc/httpd/conf/httpd.conf
like elija, said, by default it uses "index.html", but you can look for the DirectoryIndex declarative i the httpd.conf config file. You can also just explicitly load the page in the browser, e.g.:How does the server know which page is the homepage of the website?
that would look for this local file:Code:http://localhost/test/foo.html
Code:/var/www/html/test/foo.html
as far as public ip address, you want to use the internet-facing ip address on your router. you can get it via a "what is my ip" google search, or try:I do have controls in GoDaddy to associate the domain name with a DNS Server but i don't know enough to configure it correctly (i really need like a manual or something, maybe a tutor that can teach me first hand what i'm doing with this server because so far i have just been following the guide and not knowing whats going on)
Code:lynx -dump checkip.dyndns.org
from your local server, do:I have no idea if server.silmanserver.com is pointing to a public IP address, i am such a noob with this that i have less than novice experience.
Code:ping -c3 server.silmanserver.com nslookup server.silmanserver.com
Fully Qualified Domain Name. Sorry, i shouldn't have lobbed that one at you. I just meant that I think you should focus on using your local server only at first. i.e., edit HTML files on your local box, server them up via your local apache webserver, and view them via a browser on the same machine (or another one on the same local LAN).what is FQDN?
Once you get that mastered, uploading to godaddy, etc., will be a next step, and should not be too hard. hopefully, you will be able to push them via scp, etc. like elija said.
don't worry, and it should not be too hard, and isn't. just stick with it, once you figure it out, you'll love how easy it really is.I am so confused.... I am sorry if i'm trying to ask you guys to teach me to be a web admin, but i feel like it shouldnt be this difficult to get a home server and simple webpage online.
- 06-05-2012 #6Just Joined!
- Join Date
- May 2012
- Posts
- 96
Got it! The website domain name i bought from godaddy is: silmanserver.com so are you saying in the terminal of my Serverbox i should run
?Code:ip-address silmanserver.com
What did you mean when you were talking about editing host files vs a DNS server for clients?
I have WinSCP on my laptop (running windows) and i have used it for my Intro to programming and problem solving class at my University (Its just a class on C which is required for me major)
I will get behind a router as soon as possible. Thanks!
You were correct about the defualt directory:
i appear to not have lynx because i got this when looking for my internet facing ipCode:[Silman@server ~]$ grep ^DocumentRoot /etc/httpd/conf/httpd.conf DocumentRoot "/var/www/html"
Here is the ping results, they look good:Code:[Silman@server ~]$ lynx -dump checkip.dyndns.org bash: lynx: command not found
and here is the lookup results, i dont know how to interpret these"Code:[Silman@server ~]$ ping -c3 server.silmanserver.com PING server.silmanserver.com (128.120.175.117) 56(84) bytes of data. 64 bytes from server.silmanserver.com (128.120.175.117): icmp_seq=1 ttl=64 time=0.033 ms 64 bytes from server.silmanserver.com (128.120.175.117): icmp_seq=2 ttl=64 time=0.035 ms 64 bytes from server.silmanserver.com (128.120.175.117): icmp_seq=3 ttl=64 time=0.032 ms --- server.silmanserver.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 0.032/0.033/0.035/0.004 ms
Okay so im going to try to do some development straight from the box for now and see if i can access them on the box itself. It looks like that is what you guys are urging me to do and worry about remote control later.Code:[Silman@server ~]$ nslookup server.silmanserver.com Server: 169.237.250.250 Address: 169.237.250.250#53 Non-authoritative answer: Name: server.silmanserver.com Address: 68.178.232.99
Please post more information to guide me to get this online though! I really need help.
- 06-05-2012 #7
Let's head back to some basics to get you started.
Firstly, you don't need a domain to develop a website. It will come in handy when you want other people to see it though. Given that you have a domain called silman.com let's call your development version silman.dev
On your server run the following commandand add a line to the IPV4 section which has the followingCode:vim /etc/hosts
where 1.2.3.4 is your server's IP Address. Once you have saved that file, your server will know that it is called silman.dev.Code:1.2.3.4 silman.dev
Also on your server, edit the file /var/www/index.html and add the following to it, replacing any contents that are already there. If the file doesn't exist then you can create it
On your client machine add the same information to the hosts fileCode:<html> <head> <title>Hello world!</title> </head> <body> <h1>Hello world</h1> <p>This is exciting</p> </body> </html>
and visit silman.dev in your browser. Assuming you are on the same network, there are no firewall issues and selinux doesn't get in the way you should see the page.Code:1.2.3.4 silman.dev
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 06-05-2012 #8Just Joined!
- Join Date
- May 2012
- Posts
- 96
From the guide that i followed my hosts file is already edited a1nd has
but i added 128.120.175.117 silman.dev anyway so i can follow your guide, should i delete the other line? (server.silmanserver.com is the name of the computer itself as per the guide)Code:128.120.175.117 server.silmanserver.com server
I should also note that here is no IPv4 section or IPv6 section in hosts, its just a couple lines (i have IPv6 disabled so i think its in the proper place)
I also wanted to ask you what you meant by "client machine"
Thanks for the guide btw!!! i really appreciate this!
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
- 06-05-2012 #9
That's fine. You can have many names for the same IP Address
That's also fine.
The computer with the web browser on it.
We had this happen on a server at work but unfortunately I can't remember the solution at the moment.If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 06-05-2012 #10Just Joined!
- Join Date
- May 2012
- Posts
- 96
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?
I will google this problem when i get back from Lab in a couple hours, i can't see it being very difficult to troubleshoot. I will post back when i'm home.
Thanks again for the help!


Reply With Quote

