Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: add pages to the webserver (apache)

  1. #1
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12

    add pages to the webserver (apache)

    Hi fellows!

    (running from cd):

    I started apache typing "apache" on the shell as root user.

    After this, I was able to access the html file which are located on /var/www.

    So far so good. But, how could I add pages (php pages in my case) on the server root?? When I try to save a file to /var/www I'm not able to (which is understandable)....

    Thanks in Advance

    Felipe Lopes

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    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.

  3. #3
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    or, even easier, edit apache's config file to change it to another path.

  4. #4
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    Quote Originally Posted by probono
    or, even easier, edit apache's config file to change it to another path.
    Even running knoppix from CD am I able to edit apache's config file??

  5. #5
    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 probono
    or, even easier, edit apache's config file to change it to another path.
    Even running knoppix from CD am I able to edit apache's config file??
    You can edit the files in /etc/?? they only get saved to ramdisk unless you install to Hard Drive or keep your configuration with floppy config or persistent home.

  6. #6
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    When I tried to edit and save the config file the system said that I had no permission...I guess it impossible to save, isn't it?

  7. #7
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by felipe_lopes
    When I tried to edit and save the config file the system said that I had no permission...I guess it impossible to save, isn't it?
    Try editing the file with sudo editor file to be superuser (root) when you edit and save.

  8. #8
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    Quote Originally Posted by Stephen
    Try editing the file with sudo editor file to be superuser (root) when you edit and save.
    Here what I tried to do:

    Open a shell from /etc/apache

    Code:
    sudo su
    
    kedit httpd.conf
    I tried to use the shell editor but was too hard for me

    Then I changed the lines I wanted to and when I tried to save it appeared:
    "Unable to write to file"

    What more can I do?

  9. #9
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    I just booted the CD on a spare computer and it worked for me here although I used vi but that should not matter. Editing the file to change the root really is not going to make much difference anyway you are going to store these files on the HD right? In which case just leave the file as is the support for PHP is already turned on in the httpd.conf and do as I suggested in my post above make a directory on HD and serve yourself web pages from there.

  10. #10
    Junior Member registered user
    Join Date
    Apr 2003
    Posts
    12
    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

Page 1 of 2 12 LastLast

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
  •  


LOT (8) Cisco UCS UCSB-B200-M5  2x6248R  24 core 3.0G   24x64g DDR4-2933 ram picture

LOT (8) Cisco UCS UCSB-B200-M5 2x6248R 24 core 3.0G 24x64g DDR4-2933 ram

$112000.00



Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM picture

Dell PowerEdge FX2s + 8x FC430 Blades 16x E5-2630v4 160 Cores Rails No PSU/RAM

$699.00



NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 - 4X S25G NICs picture

NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 - 4X S25G NICs

$1999.97



Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD picture

Dell PowerEdge FC430 Blade Server 2x Xeon E5-2630v4 20 Cores FX2 FX2s No RAM/HDD

$119.99



HPE Synergy 480 Gen 10 Blade Server | 96GB Ram | No HDDs | Complete Otherwise picture

HPE Synergy 480 Gen 10 Blade Server | 96GB Ram | No HDDs | Complete Otherwise

$500.00



Dell PowerEdge VRTX Rackmount Chassis w/4x PSUs 2x CMC Modules picture

Dell PowerEdge VRTX Rackmount Chassis w/4x PSUs 2x CMC Modules

$399.98



Dell PowerEdge FX2 FX2s Server 10GbE CMC Blade Enclosure Chassis picture

Dell PowerEdge FX2 FX2s Server 10GbE CMC Blade Enclosure Chassis

$274.99



Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB picture

Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 2.8ghz 20-Cores | 128GB

$149.99



Lot of 3 Dell PowerEdge Blade Server HHB005 x2 HHB006 x1 picture

Lot of 3 Dell PowerEdge Blade Server HHB005 x2 HHB006 x1

$256.49



Dell Poweredge VRTX 25Bay 2.5

Dell Poweredge VRTX 25Bay 2.5" 2x PERC 8, 2xCMC, I/O 1GB Pass Through, 4x PS

$578.08