Page 6 of 11 FirstFirst ... 45678 ... LastLast
Results 76 to 90 of 153

Thread: How-to Lighttpd, PHP, MySQL and Eaccelerator

  1. #76

    mysql5

    Did anyone get things working with mysql 5 ? There is a package in the repository, but it does not want to start after install. phpmyadmin does not install after installing mysql5.
    Does it still require recompling?

  2. #77
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by modelamark View Post
    Did anyone get things working with mysql 5 ? There is a package in the repository, but it does not want to start after install. phpmyadmin does not install after installing mysql5.
    Does it still require recompling?
    I don't think mysql 5 is ever going to work on these routers actually, probably because it's software design is a bit different compared to mysql4.
    Also mysql5 requires more resources, and that while mysql4 only pulls of about 100kb/s max

    in the end mysql 4 can do the same things mysql 5 can, apart from some really specialized stuff hardly used in regular webpackages

    recompiling won't work either because the compiler on the router has problems with c++.
    You might be able to pull it off with the crosscompiler after a bit of work
    Last edited by wpte; 18-01-2010 at 20:42.

  3. #78
    Quote Originally Posted by wpte View Post
    I don't think mysql 5 is ever going to work on these routers actually, probably because it's software design is a bit different compared to mysql4.
    Thanks, all I needed to know. I wanted to run joomla on it, which went fine with mysql4, until some extension required mysql5. I will try to find a sql4 alternative for that.

  4. #79

    Question SSL: Private key error

    Hello,

    I followed the tutorial. No errors shown during the process.
    However, when I try to start lighttpd it gives this error:

    Starting web server: lighttpd
    2010-08-01 18:29:11: (network.c.589) SSL: Private key does not match the certificate public key, reason: error:02001002:system library:fopen:No such file or directory /opt/etc/lighttpd/lighttpd.pem

    Of course, I checked for the file existence and it is not there. But should it? Why is there SSL certificate check?

    Anyhow, I spent last couple of hours searchingg for a solution, but did not find any. (I am not linux guru, so I might be missing something).

    Only change to the original tutorial is that I have my www root in /tmp/harddisk/www and I have changed the path in one of the tutorial commands accordingly.

    Any ideas?
    Thanks.
    Brano.

  5. #80

    Thumbs up Solved (?) -> SSL: Private key error

    Quote Originally Posted by BrandonSk View Post
    Hello,

    I followed the tutorial. No errors shown during the process.
    However, when I try to start lighttpd it gives this error:

    Starting web server: lighttpd
    2010-08-01 18:29:11: (network.c.589) SSL: Private key does not match the certificate public key, reason: error:02001002:system library:fopen:No such file or directory /opt/etc/lighttpd/lighttpd.pem
    ...
    Brano.
    Hi all,

    well, I did start the server after all but I am not sure whether I did the right thing.

    I went to the config file and commentted out everything around the SSL server thing (at the end of config) - this was the part referencing the PEM file.

    Now, server starts and works. But was this the right thing to do? Am I missing something because of that? I suppose https

    Cheers,
    Brano.

  6. #81
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by BrandonSk View Post
    Now, server starts and works. But was this the right thing to do? Am I missing something because of that? I suppose https

    Cheers,
    Brano.
    SSL isn't configured in the config file, for that you need to do some things yourself

    You can make a self signed pem file yourself like this:
    openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
    you need openssl installed for that

    now for the lighttpd config file (just add it somewhere):
    $SERVER["socket"] == ":443" {
    #### SSL engine
    ssl.engine = "enable"
    ssl.pemfile = "/opt/etc/lighttpd/server.pem"
    server.document-root = "/harddisk/mnt/www"
    }
    This creates a separate socket with ssl
    this way your site works via http and https

    try it out on my site, I've been running that for a month or so: https://wpte.kicks-ass.net/

    Now obviously browsers say its unsafe since it's not signed by a known company.
    You can still import it for general accepted certificates tho, but for windows you need something like a .der file
    this is how you convert the pem file to a der file:
    openssl x509 -in server.pem -inform PEM -out server.der -outform DER

    I'm going to update this how-to soon btw, since I found out I have 3 major errors in it
    Last edited by wpte; 01-08-2010 at 19:37.

  7. #82

    mysql_connect problem

    Hi!
    I just installed everything according to the 1.st post.
    I got 3 problems, 2 of them are solved in this forum, they were:
    1.) When using the ipkg eaccelerator, server gives internal error 500 when the extension of a file is *.php, but it works well with *.html.
    solution: do the manual install.
    2.) couldn't connect to the mysql, something about authorization error
    solution: delete or comment the 20.th line of my.cnf that says password

    And finaly the one i cannot find anywhere.
    3.) I dumped a database from my wamp installation.
    mysqldump kruh > kruh.sql;
    i moved this file to my router, executed it with
    source kruh.sql;
    everything works fine, i am able to run selects, for instance select(*) from users; gives me 4.
    But i cannot get this to work in php.
    My code:
    Code:
    $db_host = 'localhost';
    $db_user = 'bady';
    $db_pass = '';
    $db_data = 'kruh';
    // ---------------------------------------------------
    $link=mysql_connect($db_host,$db_user,$db_pass);
    if(!$link) die("unable to connect: ".mysql_error());
    mysql_select_db($db_data,$link);
    $x=mysql_result(mysql_query("select count(*) from users",$link),0);
    echo $x;
    This returns nothing
    If i change the select to "select NOW() from dual" it works fine, so im connected to DB. What am i doing wrong?

    EDIT: this solved the problem:
    typed this in mysql console: grant all privileges on *.* to ''@'localhost';
    Last edited by badyto; 07-09-2010 at 19:35.

  8. #83
    Hi,

    I've created .pem and .der files with openssl after which I've added lines proposed by Wpte to lighttpd.conf file. Restart of lighttpd and no monit about certificate under https:// address. Should I have 443 port forwarded or what?

  9. #84
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Hi,

    I've created .pem and .der files with openssl after which I've added lines proposed by Wpte to lighttpd.conf file. Restart of lighttpd and no monit about certificate under https:// address. Should I have 443 port forwarded or what?
    What exactly happens?
    you can see your webpages in https?
    or isn't it encrypted at all?


    @badyto
    I know there are serious problems with the how-to at the moment due to updated ipkg packages.
    Unfortunately I haven't found the time to fully test my findings.
    The updated how-to will be shorter and easier to understand
    Last edited by wpte; 09-09-2010 at 13:59.

  10. #85
    Basically when i try to connect thru https:// i don't get a reply, no 501 or 404 error just time out in FireFox and IE 8. I've tried to add this
    Code:
    $HTTP["scheme"] == "https" {
        server.document-root        = "/www/servers/www.example.org/secure/" 
     }
    but it didn't helped at all. Thru http:// I can use my site but not thru https://

  11. #86
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Basically when i try to connect thru https:// i don't get a reply, no 501 or 404 error just time out in FireFox and IE 8. I've tried to add this
    Code:
    $HTTP["scheme"] == "https" {
        server.document-root        = "/www/servers/www.example.org/secure/" 
     }
    but it didn't helped at all. Thru http:// I can use my site but not thru https://
    You mentioned port forwarding as well?
    if you're in the local network of your router no port-forwarding is needed

    but for external access you can add a basic iptables rule like this to your firewall:
    iptables -A INPUT -p tcp --dport 443 -j ACCEPT
    in the end, the config settings I wrote in my previous post should be all to make https work.
    I've double checked it in my config

  12. #87
    Added iptables rule and didn't helped still can't use SSL connections. Maybe something is wrong with my .conf file, could you look into it?

    Edit: This is new when I've entered local IP - https://192.168.1.1 a certificate notification appeared so it works, but why not on my external IP?
    Attached Files Attached Files
    Last edited by cichy; 09-09-2010 at 17:40.

  13. #88
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Added iptables rule and didn't helped still can't use SSL connections. Maybe something is wrong with my .conf file, could you look into it?

    Edit: This is new when I've entered local IP - https://192.168.1.1 a certificate notification appeared so it works, but why not on my external IP?
    Good to know it works locally

    Just as the "server.port = 8081" the ssl socket should bind to every network interface.
    if it's not the modem that requires an extra firewall setting you might try these config changes:

    $SERVER["socket"] == "0.0.0.0:443"{
    ...


    $SERVER["socket"] == "127.0.0.1:443"{
    ...
    not sure if they work, but it's worth trying


    I do think it's something with the firewall tho, since:
    x.x.x.x isn't responding on port 443 (https).
    (as moderator I can see your ip, no worries)

  14. #89
    This didn't helped either, still no ssl connections but on local IP it works (sic!). Also I've tried some of this tutorial on port changing.
    Code:
    nvram set http_lanport=8080
    nvram commit
    did that, restarted router and sure web-gui works fine but no website on my router (port changed from 8081 to 80 like in tut). Also I removed 1 rule from iptables which I thought is not usefull any more, this was:
    Code:
    iptables -t nat -A VSERVER -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.1.1:8081        # przekierowanie www
    Any ideas what's wrong, lighty is working according to htop.

    Edit: Https:// connection with address https://ex.ip:8081 works but why not with https://ex.ip ?
    Last edited by cichy; 09-09-2010 at 19:06.

  15. #90
    Join Date
    Dec 2007
    Location
    The Netherlands - Eindhoven
    Posts
    1,767
    Quote Originally Posted by cichy View Post
    Edit: Https:// connection with address https://ex.ip:8081 works but why not with https://ex.ip ?
    I know that lighttpd is a bit strict when it comes to ports...
    have you tried to set the standard port to 80 + my config code?
    if that works, it might be a lighttpd bug, or setting I'm not aware of


    https://ex.ip:8081 doesn't work for me here

Page 6 of 11 FirstFirst ... 45678 ... LastLast

Similar Threads

  1. Full server config: Samba ftp http xmail mysql forum motor
    By KisVuK in forum WL-500gP Tutorials
    Replies: 14
    Last Post: 15-12-2008, 21:34

Tags for this Thread

Posting Permissions

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