Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Hosting a website from Linux

  • 22-09-2010 9:59pm
    #1
    Registered Users, Registered Users 2 Posts: 23,140 ✭✭✭✭


    May or may not be the right location to post, but since its mainly a linux problem and query this is probably the best place.

    I'm looking to host a website from my new server for my world of warcraft guild. I have gone about installing apache, phpadmin, mysql and the other thing that escapes my mind.

    I tried installing webmin but unfortunately there is a missing package I cant find anywhere.

    Essentially the problem I'm having is everything was setup fine. But when I go to http://<serverip>/myphpadmin ( or whatever the address is) I'm just getting a blank error page signalled by Google Chrome.

    When I run http://<serverip&gt; I do get confirmation that apache is running.

    I've torn through the internet and cant find a decent step by step on how get to the point of hosting a page online.

    Any help or links to guides would be awesome, cheers.


Comments

  • Registered Users, Registered Users 2 Posts: 425 ✭✭Mathiasb


    Check the apache logs (in /var/log/httpd/error.log or something IIRC), to see if you can find anything.


  • Registered Users, Registered Users 2 Posts: 218 ✭✭Tillotson


    Shouldn't the address be http://<your_address>/phpmyadmin?

    If you haven't already, you'll need to install php and configure apache to use it. You can check that it is installed properly by making a file in /var/www/info.php containing:
    <?php
    phpinfo();
    ?>
    

    If your server is running a newer version of ubuntu you can install apache, mysql and php in a single command:
    sudo  tasksel
    
    and select lamp server.

    Follow the documentation provided by your distro, don't trust blogs.


  • Registered Users, Registered Users 2 Posts: 23,140 ✭✭✭✭TheDoc


    All the tools like apache etc are installed and working but when I go to point to http://<myip>/phpadmin, nothing arises.


  • Registered Users, Registered Users 2 Posts: 425 ✭✭Mathiasb


    TheDoc wrote: »
    All the tools like apache etc are installed and working but when I go to point to http://<myip>/phpadmin, nothing arises.

    Apache is not a tool, it's a web server. (httpd)

    Please try to read the responses in this thread (they are written in casual English or so), then reply with the relevant information asked for etc.

    Of course, you don't have to, but then don't expect anything, Help us help you!


  • Registered Users, Registered Users 2 Posts: 23,140 ✭✭✭✭TheDoc


    erm...ok...

    Apache is working fine.

    All the packages I had to download, I downloaded and they installed fine.

    I've done this many a time before through a windows system and after all the packages are installed I simply had to direct my url bar to the phpadmin installation and off it would go.

    In this instance I'm unable to launch an installation, although no documentation I've read says I need to.

    I'll have another crack or so on Sunday as Iwont be playing with it today or tomorrow.

    And apache is a tool, a tool that provides a web server. Got a sense of slyness of your comment there that isnt greatly appreciated considering I've done this sort of lark 101 times before, but linux it seems just over-exuberantly complicated.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 8,584 ✭✭✭TouchingVirus


    TheDoc wrote: »
    erm...ok...

    Apache is working fine.

    All the packages I had to download, I downloaded and they installed fine.

    I've done this many a time before through a windows system and after all the packages are installed I simply had to direct my url bar to the phpadmin installation and off it would go.

    In this instance I'm unable to launch an installation, although no documentation I've read says I need to.

    I'll have another crack or so on Sunday as Iwont be playing with it today or tomorrow.

    And apache is a tool, a tool that provides a web server. Got a sense of slyness of your comment there that isnt greatly appreciated considering I've done this sort of lark 101 times before, but linux it seems just over-exuberantly complicated.

    If Apache is a tool that provides a webserver, then all software are tools that help you do something, just for the record.

    The blank error page suggests to me that there is a PHP-based error but that the PHP configuration prevents the displaying of the error message. On production (as in, live) sites it is highly recommended that the php.ini setting "display_errors" is set to off. This prevents errors revealing information about your setup to the user. However, the errors can still be logged to a logfile.

    I'm fairly sure PHP doesn't log to the generic Apache log (in /var/log/apache/error.log or whereever it is [check httpd.conf]) unless you explicitly tell it to, once again this is done in the php.ini file. You also need to set log_errors to "on" to log to the file.

    Steps to take:

    1) Test PHP
    [php]<?php phpinfo(); ?>[/php]
    Copy that to a file, drop it into your webserver's document root and open it. If PHP displays it's secrets then PHP is set up. You can search for the locationof your log file in this info page, or just open PHP.ini and find it yourself.

    2) Turn display_errors on in the PHP.ini file and visit the phpmyadmin page again to see what's wrong

    3) If you don't want to turn on display_errors then make sure php is logging errors and open the log file and check it out.


    Linux isn't overly-complicated, and while Mathiasb was a bit off about his casual english comment he was the first one to suggest you look at the log files, which you never replied about :)


  • Registered Users, Registered Users 2 Posts: 425 ✭✭Mathiasb


    Yeah sorry, didn't mean to sound evil :D


  • Registered Users, Registered Users 2 Posts: 23,140 ✭✭✭✭TheDoc


    No problems mate might very well being me giving dry information, ill have a butchers over the weekend Nd see if I can get anywhere with it


  • Registered Users, Registered Users 2 Posts: 1,340 ✭✭✭bhickey


    TheDoc wrote: »
    No problems mate might very well being me giving dry information, ill have a butchers over the weekend Nd see if I can get anywhere with it

    What Linux distribution are you using? To be honest, you shouldn't have to do anything particularly special for what you're trying to do. Knowing a bit more about what you're using though will help people provide more specific answers. Even something like Webmin would be installed differently depending on what distribution you're using.


  • Registered Users, Registered Users 2 Posts: 19,050 ✭✭✭✭murphaph


    I agree with the above...I recently installed Apache/PHP/MySql on Windows 7 and it was a bloody nightmare.

    I then realised I need Linux for this particular project I want to do and so installed Ubuntu, fully expecting it to be another nightmare (and dreading it tbh) to get the web server etc. up and running...couldn't believe how easy all that was compared to Windows. It just seemed to "work" with a few simple commands everthing was downloading and installing itself (kind of like using PEAR on Windows, AFTER you've gone through the hassle of setting it all up!).

    Most of the problems I have encountered in the past few weeks with Linux have come down to permissions. The OS is so secure you forget that this and that has no permission to do the other. Had the same again today trying to access the serial port (actually a serial port adapter in a USB port) through a PHP program from another computer. Took a while for me to realise the PHP script didn't have the permissions to access /dev/ttyUSB0...quick chmod and I can now communicate with the serial port on my Linux laptop from a webpage on my windows one....cool.

    There are still a few crappy things with Linux but imagine if manufacturers put even 10% more effort into supporting it.


  • Advertisement
Advertisement