Koozali.org: home of the SME Server

Using a web server.

Offline steever

  • *
  • 185
  • +0/-0
    • Open-Sesame
Using a web server.
« on: December 14, 2004, 02:10:44 AM »
Hello.  I am using SME in server/gateway mode, hosting my school's website.  The SME's IP address is 192.168.1.2. We can access the school website internally and externally by typing in http://www.school.ac and http://school.ac which is great and works fine!  

I would like to host a different website on a dedicated Fedora Core 2 machine (on my local network.  This is when I start having trouble.  The domain school2.ac has been registed (and dns records have been created on our dns server) and anybody typing in http://school2.ac or http://www.school2.ac goes through to the SME box, regardless of whether they are on-site or off-site.  This is good too.  But I am having no end of trouble trying to pass these requests to the Fedora box.  I have tried the proxypass contrib, but the end result was kind of whacked, the css of http://school2.ac was not working and none of the images were showing, also typing anything in like http://school2.ac/index.php gave us a proxy GET error.

What's the best solution for this?  Please help!
Saving the world ... one server at a time.

cc_skavenger

Using a web server.
« Reply #1 on: December 14, 2004, 06:32:47 AM »
IMHO, easiest solution is to move the website from the FC machine to the SME server.

Just my $0.02.

Marco

Offline steever

  • *
  • 185
  • +0/-0
    • Open-Sesame
I would but ...
« Reply #2 on: December 14, 2004, 06:58:22 AM »
I'd like the second site to have it's MySQL database managed by someone other than me (the SME admin) - but so far I haven't found any good solutions for that.  If I could find out how to set up a MySQL user with access to only one database that can administer remotely (either through phpmyadmin or mysqlcc) I just put their site on the SME server ...[/quote]
Saving the world ... one server at a time.

gbaird

read the instructions in phpmysqladmin
« Reply #3 on: December 14, 2004, 08:48:38 PM »
You are able to setup user rights in the config page of phpmysqladmin which allows a certian user to access the administration of a certian database

This can also be done with mysqlcc when you add the user
you give them the administration access you want for a certian database

Offline steever

  • *
  • 185
  • +0/-0
    • Open-Sesame
How to do this with phpmyadmin?
« Reply #4 on: December 14, 2004, 11:54:55 PM »
I've looked and looked over these forums but am unable to find out how to allow a user access to just one database through phpmyadmin.  As for mysqlcc, I can't even get it to connect ... , and all of the posts I've seen about using it say the same thing.  Please help!  I am sure almost everybody is interested in how to do this.
Saving the world ... one server at a time.

gbaird

using phpmyadmin
« Reply #5 on: December 15, 2004, 03:51:06 PM »
If you look at the index.php or config.php can't recall which one it is you will find some variables you can set like

the server to connect to who can connect & who can connect to which database table this is in the phpmyadmin docs

easy to follow and setup as far as mysqlcc you need to enable remote access on your sme server to be able to connect to mysql

search the forums for remote access to mysql

access is local only on a install below is what you need to do

Per default, MySQL accpets only connections locally on the server.

Here's what I do after install:

1. Enable remote access:

# /sbin/e-smith/config setprop mysqld LocalNetworkingOnly no
# /sbin/e-smith/expand-template /etc/my.cnf
# /etc/rc.d/init.d/mysqld restart

2. Create new user to do my admin work in MySQL:

GRANT ALL ON * TO admin@localhost IDENTIFIED BY “password” WITH GRANT OPTION;
GRANT ALL ON * TO admin@”%” IDENTIFIED BY “password” WITH GRANT OPTION;

then you can use mysqlcc to connect with admin & the password you used You see the line admin@% this means admin at any host can connect

you can then add the user you want with the same login

ie: bob@% his password and only the tables you want him to access with the permissions you give him


you can also use phpmyadmin in an ibay say webassist and password it or configure the phpmyadmin config.php file for the access you want to give you should watch your security
on the ibay however just get the phpmyadmin zip download
un-zip it and ftp it to your webassist ibay don't forget to edit the config.php read the docs

hope this helps