+ Post New Thread
Results 1 to 13 of 13
*nix Thread, making a no-frills webserver in Technical; it used to be the case I could make a no-frills webserver with debian, really easily. do a base install ...
  1. #1
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40

    making a no-frills webserver

    it used to be the case I could make a no-frills webserver with debian, really easily.
    do a base install
    manually install apache php mysql phpmyadmin in that order

    and it would magically work

    just done it and now php doesnt work

    I'm getting unknown file type on php files in IE

    wtf!?

    I despair with linux cos they keep moving the goalposts!

  2. #2
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    You will need to add the apache file type handler. Follow the destructions below:

    http://rssfeedreader.com/php.html

    #1 Instructions for adding PHP code to an HTML site;
    PHP scripts do not automatically work on html pages. If you have an HTML or (.HTM) based site, in order for PHP scripts to run on your .htm or .html pages you have a 2 options;

    For Apache Servers Edit your .htacess with AddType application/x-httpd-php .htm .html Then Add the php code from the reader directly to your html pages


    For Apache Servers Edit your .htacess with either .htm server parsed .html server parsed or
    Addhandler application/x-httpd-php .html .php Then follow the directions below to use the php code from the reader with SSI Includes.
    ***NOTE: For Windows or IIS servers - You do not have an .htaccess file. Windows IIS servers also cannot run php on html pages. Your only option for windows IIS servers is to use .shtml or .php pages with the php option from the reader. Or add Javascript to your html pages. For .shtml pages check your setup options and make sure the option for SSI inlcudes is checked, then follow the directions below for creating the SSI include and file.

  3. #3


    Join Date
    Oct 2006
    Posts
    3,411
    Thank Post
    184
    Thanked 356 Times in 285 Posts
    Rep Power
    148
    Or just download Ubuntu Server and click LAMP. then install phpmyadmin and you're done. Takes all of 5 minutes.

  4. #4
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    those instructions say

    "#2 Instructions for adding PHP code to a PHP site;

    For a PHP based website, you simply add the PHP code produced by the RSS Reader directly to your PHP pages. Do not modify it in any way. Add the PHP code to the web page anywhere that you want to display the headlines. You may add it to as many pages on your site as warranted.
    Do NOT modify your .htaccess file for PHP pages. "


    im not trying to add php to html pages.

    a simple test.php of phpinfo() in /var/www

    doesnt even work.
    Last edited by browolf; 26th January 2009 at 11:14 AM.

  5. #5

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Which distribution of Debian - etch (stable) or lenny (testing)?

  6. #6
    danrhodes's Avatar
    Join Date
    Sep 2008
    Location
    Wath Upon Dearne
    Posts
    1,513
    Thank Post
    157
    Thanked 181 Times in 150 Posts
    Rep Power
    67
    Oh, sorry I though you were wanting to add php to html docs, my mistake!

    Not sure why PHP wont work then.

    D

  7. #7
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    Quote Originally Posted by powdarrmonkey View Post
    Which distribution of Debian - etch (stable) or lenny (testing)?
    its etch.

  8. #8

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Ok, I've just woken up. You need to install libapache2-mod-php (or similar, eg libapache-mod-php5/libapache2-mod-php4 - you get the idea). Check which version of apache you have first. If apt screams at you, you've probably used the wrong apache version. Apache2 is the default in both etch and lenny, I think.

    Then, move the configuration for it from mods-available to mods-enabled:
    Code:
    mv /etc/apache2/mods-available/php5* /etc/apache2/mods-enabled
    Do you use aptitude or apt-get?

  9. #9
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    Quote Originally Posted by powdarrmonkey View Post
    Ok, I've just woken up. You need to install libapache2-mod-php (or similar, eg libapache-mod-php5/libapache2-mod-php4 - you get the idea). Check which version of apache you have first. If apt screams at you, you've probably used the wrong apache version. Apache2 is the default in both etch and lenny, I think.

    Then, move the configuration for it from mods-available to mods-enabled:
    Code:
    mv /etc/apache2/mods-available/php5* /etc/apache2/mods-enabled
    Do you use aptitude or apt-get?
    apt-get

    I'll try that. I've just realised I seem to have apache & apache 2 installed. there's config files for both. pretty sure I only did 1 install apache command. dont really know which one is being used or both or what,

    thx

  10. #10

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    You can't have them both, they are marked as conflicting and apt will refuse. If you install aptitude then you can say:

    Code:
    aptitude show apache
    aptitude show apache2
    to see which you really have. Generally config files get left behind in case you've customised them and still need them for reference.

    If you really do have Apache 1.3 still, I would replace it before you do anything else.

  11. #11
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    Quote Originally Posted by powdarrmonkey View Post
    You can't have them both, they are marked as conflicting and apt will refuse. If you install aptitude then you can say:

    Code:
    aptitude show apache
    aptitude show apache2
    to see which you really have. Generally config files get left behind in case you've customised them and still need them for reference.

    If you really do have Apache 1.3 still, I would replace it before you do anything else.
    aptitude already installed. it must be standard in the base image.

    apparently its just apache 1.3 I have installed. In that case I'm going to start again but install apache2 maybe thats why nothing is working like it ought to lol. Maybe i've forgotten I used to install apache 2....

    thank you.

  12. #12

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by browolf View Post
    aptitude already installed. it must be standard in the base image.

    apparently its just apache 1.3 I have installed. In that case I'm going to start again but install apache2 maybe thats why nothing is working like it ought to lol. Maybe i've forgotten I used to install apache 2....
    If you just say
    Code:
    aptitude install apache2 libapache2-mod-php5
    then apt should sort out the conflict for you, remove apache1.3 and set up apache2 and php5's dependencies. Then just activate it as above. If it doesn't, do
    Code:
    aptitude remove apache
    first.

    The whole point of apt is to make managing packages like this really, really easy (though it's also been known to solve puzzles like solitaire, if I can find a link I'll post it. It's very elegant)

  13. #13
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,524
    Thank Post
    106
    Thanked 88 Times in 74 Posts
    Blog Entries
    46
    Rep Power
    40
    Quote Originally Posted by powdarrmonkey View Post
    If you just say
    Code:
    aptitude install apache2 libapache2-mod-php5
    then apt should sort out the conflict for you, remove apache1.3 and set up apache2 and php5's dependencies. Then just activate it as above. If it doesn't, do
    Code:
    aptitude remove apache
    first.

    The whole point of apt is to make managing packages like this really, really easy (though it's also been known to solve puzzles like solitaire, if I can find a link I'll post it. It's very elegant)
    I prefer to and have done started from scratch. its a virtual server anyways so its pretty easy to do. I want to know the process from scratch works and lo and behold, specifing apache2 and php5 , ah everything magically works again.

SHARE:
+ Post New Thread

Similar Threads

  1. Virtulalising a Webserver (on UNIX)
    By markwilliamson2001 in forum Thin Client and Virtual Machines
    Replies: 7
    Last Post: 24th August 2008, 09:06 AM
  2. What is your webserver running?
    By FN-GM in forum Web Development
    Replies: 30
    Last Post: 15th August 2008, 08:46 AM
  3. Explosion Takes out our Webserver.
    By ICT_GUY in forum Web Development
    Replies: 12
    Last Post: 4th June 2008, 11:24 AM
  4. Debian DVD
    By PEO in forum General Chat
    Replies: 10
    Last Post: 7th January 2008, 04:08 PM
  5. debian on a stcik
    By russdev in forum *nix
    Replies: 4
    Last Post: 11th November 2005, 09:50 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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