Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-27-2010, 05:02 PM   #1
LQ Newbie
Registered: Aug 2009
Posts: 10

Rep: Reputation: 0
Web server


Thanks for dropping in. I don't suppose that you know anything about how I go about getting the Apache server set up so it is like my web host account structure? I need to access the webserver on my PC and have a local development copy so that I can develop and test the site locally..?

I put in and get the "It Works!" message which is nice but utterly useless to me as I can not modify the file in that folder. and the other issue is that my web host is using a different linux system than mine. They use a RedHat server and have a structure like this...


where the is the domain name of the site.

The FTP side of things that I also need to emulate has a path like /home/sites/ so that you see in that folder the public_html folder.

I have tried reading it up on the Apache site but that makes as much sense as wall sockets in a swimming pool.

I see regular notice about updates to things like PHP and Apache as well as other things that this install appears to have but I can not access.

I really really need to set up a server that has Apache, URL rewriting, PHP and MySQL and if possible SQL Lite and any other web goodies I can lay my hands on. I also need to FTP the files.

I need to mirror the server for development. Its painfully slow with my dongle modem. The thing is meant to be (HSDPA) broadband but its more like 2G.

So does anyone have the Dummies Dummies Dummy guide to Dummies guide to Linux simplified ladybird book edition?
Old 04-27-2010, 05:25 PM   #2
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
The operating system has no relevance to your web site. If you have a working web server, then anything you create and place in the correct directory will be treated exactly the same.
The trick is not to use fully qualified links between pages, but instead use relative links, much like your alias.

You define the root directory (and permissions) for apache, so whether it's called public_html, html or freds_place makes no difference - the world never sees it.

You make no mention of what OS you are actually running, or what you have already installed (apart from apache), so should we guess ?

As regards mirroring the server, you should naturally have done that before it goes on the real server. How do you know everything works otherwise ? Besides which, you need no web server to create a functional web site offline (see relative links).

Why you should need an FTP server to deal with files on your own PC I have no idea.

You don't need a guide to linux, you need a guide to web serving, and the principles of http and html.

But given your approach, I suspect you need a guide to web searching too, which is beyond my desire to help.
Old 04-27-2010, 09:26 PM   #3
Registered: Mar 2008
Posts: 16,889

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
I can say that you should not use localhost to develop with. I think you should use your lan ip or even your public ip even if you have to nat it between router or modem.
Old 04-28-2010, 06:42 PM   #4
LQ Newbie
Registered: Aug 2009
Posts: 10

Original Poster
Rep: Reputation: 0
The linux I have is Ubuntu and I did not install Apache nor did I install php. It cam with the setup.

I have tried saving to the root folder that currently exists and I do not have permissions to edit, delete or anything.

If this was a windows machine then it would be no issue at all. I used to have a production server running all that I have asked for help with setting up. I don't have a working windows machine any more, I only have Linux. I need to get this set up to develop and test prior to upload.

The environment I need is what I need and I am aware of the server can be named anything but what I need is a server set up with paths that match my remote host because many of the back end scripts have to have hard coded paths or the do not work as I found out when I used dynamic set paths. The simple reason should be apparent but in case you missed it, if I have hard coded paths and I upload them to the server, they won't work! So that's why I need a specific environment.

I asked in the ubuntu forums over a year ago and never got any answer other than I need to configure Apache. No one said "HOW" I configure it or where I can find the config file and what I need to do to it to get the thing up and running. I also find that I can not do much because the OS complains that I am not logged in as root and using sudo does not work either.

So I would appreciate help in getting this configured and working.
Old 04-28-2010, 08:31 PM   #5
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,396

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Well, you're definitely going to need to be root (or go via sudo) to access protected areas, so let's start with that.
What exactly do you mean 'sudo does not work' Provide example cmds and responses so we can see them.
Old 04-29-2010, 05:34 PM   #6
LQ Newbie
Registered: Aug 2009
Posts: 10

Original Poster
Rep: Reputation: 0
You'll have to give me a while to put it up. I started a job this week so my time is limited and I am tired and I thought I just managed to install mysql, but it won't connect...

I have been trying to get this working.

I login through the user admin interface that runs from the Applications -> Programming menu.
I then get a pop up with the message...

Could not connect to host 'localhost'.
MySQL Error Nr. 2002
Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Click the 'Ping' button to see if there is a networking problem.
I get exactly the same for

When I chose to PING the local host or I get this kind of response.

PING localhost ( 56(84) bytes of data.
64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.102 ms
64 bytes from localhost ( icmp_seq=2 ttl=64 time=0.083 ms
64 bytes from localhost ( icmp_seq=3 ttl=64 time=0.081 ms
64 bytes from localhost ( icmp_seq=4 ttl=64 time=0.084 ms
64 bytes from localhost ( icmp_seq=5 ttl=64 time=0.087 ms
As for the other thing, when I discover what it was I was trying to install or do to something... I will let you know.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add additional web domain for existing web server in rhel5 Linux - Server 2 11-25-2009 03:45 PM
How to monitor web server, FTP server, Mail server and database server vodka33us Programming 1 06-16-2008 04:20 AM
can we configure a Linux server with mail server,file server and web server kumarx Linux - Newbie 5 09-09-2004 06:21 AM
setting up password protected web forms on an apache web server AZDAVE Linux - Security 3 07-07-2004 12:03 PM
Can't access Linux web server web pages from LAN client jaydave Linux - Networking 4 03-16-2003 02:38 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration