-
Junior Member
registered user
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
-
Senior Member
registered user
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.
-
Senior Member
registered user
or, even easier, edit apache's config file to change it to another path.
-
Junior Member
registered user

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??
-
Senior Member
registered user

Originally Posted by
felipe_lopes

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.
-
Junior Member
registered user
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?
-
Senior Member
registered user

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.
-
Junior Member
registered user

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?
-
Senior Member
registered user
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.
-
Junior Member
registered user

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
Similar Threads
-
By reyn in forum General Support
Replies: 4
Last Post: 08-24-2004, 02:56 AM
-
By drews in forum General Support
Replies: 2
Last Post: 06-25-2004, 09:59 AM
-
By Gencho in forum The Lounge
Replies: 2
Last Post: 06-19-2004, 07:01 PM
-
By sn0wflake in forum General Support
Replies: 4
Last Post: 03-25-2004, 07:08 AM
-
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
-
Forum Rules

NETGEAR ProSafe 5-port Gigabit Switch GS105v5
$9.99

Cisco Catalyst 2960-48TT-L 48-Port Fast Ethernet Managed Rackmount Switch
$46.99

TP-Link 5-Port Gigabit Unmanaged Ethernet Switch Network Expansion TL-SG105
$19.95

5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play
$31.99

TP-Link TL-SG2210P 10-Port Gigabit Smart Switch w/ 8-Port PoE+ NO AC SKU 25597
$39.99

Arista DCS-7050SX-64-R 48P 10GbE SFP+ 4P 40GbE QSFP+ RA Switch
$125.00

TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch
$22.49

Linksys 8-Port Managed Gigabit PoE+ Switch 110W w/ 2 Uplink Gigabit - LGS310MPC
$49.00

NETGEAR 5-Port Gigabit Ethernet Unmanaged Switch (Gs305) - Desktop Quiet Fanless
$22.00

10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W
$39.99