Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: add pages to the webserver (apache)

  1. #11
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by felipe_lopes
    Quote Originally Posted by Stephen
    You could mount a partition on the hard drive as /var/www/ and server yourself webpages from there. You would make a directory on the /var/www/ for your web pages and then sudo chown user:user /var/www/your_directory to change the ownership to your user then you will have read-write access. You would access your web pages by http://127.0.0.1/your_directory/file.html.
    Sorry Stephen, But I gotta be stupid....When I try to create a directory in /var/www/ it returns an error! On your code, what I suppose to put on "user:user"?
    Maybe I didn get what you said to do...

    thank you and sorry

    Felipe Lopes
    In a console window after you have booted from CD:

    sudo mount /dev/hda1 /var/www/ - to mount first partition on first drive (c: in windows)

    sudo mkdir /var/www/mywebpages - make a directory for your webpages (you could have already done this in windows first and already have your web pages there in which case this would be unnecessary)

    sudo chown -R knoppix:knoppix /var/www/mywebpages/* - to change ownership of files in all the directories of your web pages (may not be needed use if it gives you a no permission to access files)

    You may only need step one to mount the HD as your /var/www/ then when you type http://127.0.0.1/mywebpages/file.php in the browser your web pages will be served from your HD directory.

    The user:user part in post above is your username I should have been a little clearer on that.

    [edit]
    Also if it will not let you add pages to your web page directory sudo chown knoppix:knoppix /var/www/mywebpages (to find the ownership of the directory ls -la /var/www/mywebpages)
    [/edit]

  2. #12
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    I've done everything you said...The first 2 steps worked fine, but the third step returnned the following error:

    Code:
    root@ttyp0[knoppix]# chown -R knoppix:knoppix /var/www/web/*
    chown: changing ownership of `/var/www/web/index.php': Operation not permitted
    When I try to access my "web" directory thru konquedor (running apache) it says that I don't have permission to see that page...I'm assuming that it is happen due to the above error...How to solve it?

    Thank you Stephen so far!

    Felipe Lopes
    ICQ:59336685

  3. #13
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Put sudo in front of the chown line you must be super user to change permissions.

  4. #14
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    But I'm already logged in as root -> "#"

  5. #15
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Did you make the directory in knoppix or windows? If you made the directory with knoppix you can change the permissions because you just wrote to the drive, if you made it in windows are you by any chance using ntfs file system on the drive you are trying to change the permissions on if this is the case the drive would be mounted read-only you cannot write to ntfs.

    Check the output of ls -la /var/www/web and ls -la /var/www/web/* also the output of the mount command to see what the file system type is and whether there is a (rw) at the end of the line with /var/www. If the directory /var/www/web is owned by root then change it to knoppix, also try to change just the single file index.php without the -R in the chown line.

  6. #16
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    Just wondering:

    I've edit httpd.conf and then I saved it on my hd (knoppix running from cd)...
    Then I started apache this way:
    Code:
    # apache -f /path/to/file/httpd.conf
    Didn't worked though!!!
    Does it only work w/ knoppix on hd?

  7. #17
    Junior Member
    Join Date
    Nov 2003
    Posts
    16

    Followup on apache -f parameters

    Hi guys,
    I confirm, using -f (apache -f) is best, transfer your config files(httpd.conf)
    onto another partition. but ?

    There's a problem here:
    trying changing the ownship of files in ... let's say ... /mnt/sda4
    (my website resides on sda4)

    bring me to "operation not permitted" !
    Even as "root" . I already posted a message about that.

    wouldn't be best to hdinstall ?

    thanks for any info

    uname -a
    Knoppix 2.4.22 i586 19092003

    hdwlist:
    sis530 amd k6-2 500, onboard sound
    156 mb ram
    3com 905btx
    cd, ide zipdrive 100mb, sandisk 64mb usb, floppy and hda 2.4 gig
    usb ezonics II webcam, wintv-go pci

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Using Knoppix to view web pages
    By reyn in forum General Support
    Replies: 4
    Last Post: 08-24-2004, 02:56 AM
  2. How to view installed man pages?
    By drews in forum General Support
    Replies: 2
    Last Post: 06-25-2004, 09:59 AM
  3. Can you read this pages (with Konqueror)
    By Gencho in forum The Lounge
    Replies: 2
    Last Post: 06-19-2004, 07:01 PM
  4. Searching man pages
    By sn0wflake in forum General Support
    Replies: 4
    Last Post: 03-25-2004, 07:08 AM
  5. printing: only empty pages...
    By Idletask in forum General Support
    Replies: 0
    Last Post: 01-09-2004, 01:03 PM

Posting Permissions

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


GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX picture

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX

$59.99



GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5 picture

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5

$119.99



Corsair RMe RM850e 850W 80 Plus Gold Fully Modular Low Noise Certified Refurb picture

Corsair RMe RM850e 850W 80 Plus Gold Fully Modular Low Noise Certified Refurb

$56.99



Gigabyte GA-B85M-D3H Motherboard picture

Gigabyte GA-B85M-D3H Motherboard

$54.99



GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard picture

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard

$59.99



Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4 picture

Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4

$79.99



⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠ picture

⁠Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)⁠

$29.90



ASUS PRIME H410M-K LGA 1200 Intel 10th Gen H410 DDR4 USB3.2 Motherboard M-ATX picture

ASUS PRIME H410M-K LGA 1200 Intel 10th Gen H410 DDR4 USB3.2 Motherboard M-ATX

$59.99



Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK picture

Dell XPS 8940 Desktop Motherboard Intel H470 LGA1200 DDR4 K3CM7 KV3RP 427JK

$154.99



ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield picture

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield

$84.99