Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-09-2011, 03:15 AM
|
#1
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Rep:
|
Set up LAMP server to control database over the internet
Hi All,
I want to create a database (using mysql) and control it over the net using phpmyadmin.
I'm using basic slackware install (only command line to keep RAM req down) which is installed as a guest OS in virtualbox.
I've downloaded and installed the httpd packages and made the set-up as mentioned here: http://connie.slackware.com/~mrgobli...kware-lamp.php
at the end of this page it says to open browser and type 'http://localhost/'. I tried this out from the host OS but it didn't work.
I guess localhost is the name of the server, I replaced it with my box's name and tried to ping it but it didn't work. Am I doing it correctly?
I'm not sure if I've got all the settings correct. Could someone please help me out in setting up this complete LAMP server. Please let me know if there is any more information you require.
Thanks in advance!!!
|
|
|
03-09-2011, 08:04 PM
|
#2
|
Member
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724
Rep: 
|
Quote:
Originally Posted by rajnikhil
at the end of this page it says to open browser and type 'http://localhost/'. I tried this out from the host OS but it didn't work.
I guess localhost is the name of the server, I replaced it with my box's name and tried to ping it but it didn't work. Am I doing it correctly?
|
Hi,
http://en.wikipedia.org/wiki/Localhost
When you access http://localhost from host OS, it means you access to itself, not guest OS.
Which is networking between host and guest OS: NAT, bridged, ...?
|
|
1 members found this post helpful.
|
03-10-2011, 12:59 AM
|
#3
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Original Poster
Rep:
|
Hi,
I am able to get the page over the net now, gave the dynamic IP domain name. My next step was to enable PHP in order to be able to work with PhpMyAdmin. I uncommented the '/etc/httpd/mod_php.conf' line in the httpd conf file.
Now when I restart the server it gives me the following error:
httpd: Syntax error on line 478 of /etc/httpd/httpd.conf: Syntax error on line 6 of /etc/httpd/mod_php.conf: Cannot load /usr/lib64/httpd/modules/libphp5.so into server: /usr/lib64/libxml2.so.2: symbol gzopen64, version ZLIB_1.2.3.3 not defined in file libz.so.1 with link time reference
when I checked for it i.e. ldd libphp5.so, at the beginning it says:
./libphp5.so: /usr/lib64/libz.so.1: no version information available (required by /usr/lib64/libxml2.so.2)
Not sure what is happening here and how to correct it.
Thanks in advance for the help.
|
|
|
03-10-2011, 03:08 AM
|
#4
|
Member
Registered: Aug 2007
Location: Vietnam
Distribution: RedHat based, Debian based, Slackware, Gentoo
Posts: 724
Rep: 
|
Which distro are you running on guest OS?
|
|
|
03-10-2011, 04:41 AM
|
#5
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
You mentioned your first post that you are using Slackware. Slackware's package management system is different than most in that it does not automatically resolve the dependencies for you and the error messages look like you are missing some of the libraries that PHP depends on. One of the members in the Slackware forum here at LQ, 2handband, has written some excellent tutorials on Slackware, including one on the package management system. Here is a link to the package management page. I would recommend you review it and then look at getting your PHP either from Slackbuilds (along with the dependencies first, which it will spell out), or use Alien Bob's repositories.
|
|
|
03-10-2011, 02:58 PM
|
#6
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Original Poster
Rep:
|
Thanks Noway2. That's resolved now and is hopefully running correctly. I created an index.php doc in the documentroot but when I access it, an error is displayed which says '403 forbidden you don't have permission to access /index.php on this server.'
Could you please help me out with this as to getting this thing working.
Thanks in advance!
|
|
|
03-10-2011, 03:47 PM
|
#7
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Original Poster
Rep:
|
just to mention, in the DirectoryIndex index.php is already mentioned so that is surely not the root of the problem.
|
|
|
03-10-2011, 04:17 PM
|
#8
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
If you are running Slackware, the default document root is /var/www/htdocs, or /srv/http/htdocs as a link. The folders and files need appropriate permissions. I recommend read-write by root (only) and read by others. Your httpd process needs to be able to read the files. Verify this with an ls -a.
|
|
|
03-10-2011, 11:18 PM
|
#9
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Original Poster
Rep:
|
Like you said, my document root is /srv/httpd/htdocs and I was logged in as root when I wrote that index.php file. Then when I tried to access index.php (using lynx), while staying as root, I get the error I mentioned in the previous mail. When I login as another user or try to access the page from a browser in the host OS I get the error '404 Not Found: The Requested URL /index.php was not found on this server'. I also tried the ls -a step after going to the /src/httpd/htdocs and the result is same irrespective of who I am logged in as (root or other user). I guess then that the issue is with permission for folders and files.
Not quite sure how to do this, would be great if you could help me out (with a little detailed steps)
Again, thanks in advance.
|
|
|
03-12-2011, 12:24 PM
|
#10
|
LQ Newbie
Registered: Jan 2011
Posts: 10
Original Poster
Rep:
|
Ok slight improvement in the situation here. I no more get the 403 forbidden msg, it was an issue with the permissions and I got it resolved via chmod commands but I am still facing the 404 File not found error, now also when I am logged in as root. I also changed the document root in vhosts.conf file to point to srv/httpd/htdocs but it didn't pay off.
Can someone please help me out.
|
|
|
03-12-2011, 02:31 PM
|
#11
|
Senior Member
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125
|
Changing the permissions with chmod is the correct way to go.
A couple of things on document root, first make sure there is NOT a trailing slash on the end. Second, be sure you restart apache after making changes to the configuration file.
If you are starting with index.php, it might be easier to verify with index.html. If that pages comes up, it may be an indication of a problem with the PHP installation. You will probably want to add index.php to your directory index directive which will tell Apache to look for this file. By default it will only look for index.html.
With slackware, I don't think it uses the vhost-conf (in the /extra) directory by default either. You may need to make sure that it gets included at the very least. The configuration files are well commented, so there are probably some directions. I would start with the document root in httpd.conf to get things working and then try adding vhosts.
|
|
|
All times are GMT -5. The time now is 03:38 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|