how to find the default webpage in Apache on debian

Just installed apache on my online linux server.

how can I test the default page on the webserver ?

or if if want to develop my own webpage ?
Ravi_JaganathanAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
amprantiConnect With a Mentor Commented:
Apache configuration is located to /etc/apache2/sites-available/default
Default webpage is /var/www/apache2-default

To test if apache2 is working , open internet explorer , firefox or any web browser and type as url:

http://<server_ip> , for example:  http://10.1.1.1

This should return a page "It works!"

0
 
ixtiCommented:
It is located in /var/www
Also you can make changes in config files which are placed in /etc/apache

Fo more info I need to know which version of apache are you using (apache or apache2) and which version of debian are you based (...sarge, etch, lenny...)
0
 
Ravi_JaganathanAuthor Commented:
tried this didn't work, so tried to uninstall issued command

apt-get remove apache2

the directory \etc\apache2 was not removed, hence removed manually by issuing

rm -r apache2

And deleted file from \etc\init.d\apache2

rm apache2

then tried to install again issued command

apt-get install apache2

didn't work!!!!!!

any advise??
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
amprantiCommented:
apt-get remove --purge apache2
This way you will also delete the configs of apache2

try
/etc./init.d/apache2 restart --> to start (or restart) apache2

Check if any  other webservers are running

Give usthe output of   iptables --list -nv to check if you have firewall enabled
0
 
Ravi_JaganathanAuthor Commented:
Hi,

Apologize for the delay. I tried to exuecute the commands but didn't work. Please see the logs below

christinebovill:/etc/init.d# apt-get remove --purge apache2
Reading package lists... Done
Building dependency tree... Done
Package apache2 is not installed, so not removed
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  apache2-mpm-worker: Depends: apache2.2-common (= 2.2.3-4+etch4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


christinebovill:/etc/init.d# iptables --list -nv
Chain INPUT (policy ACCEPT 780 packets, 57891 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 627 packets, 88546 bytes)
 pkts bytes target     prot opt in     out     source               destination
christinebovill:/etc/init.d#
0
 
amprantiCommented:
Type "apt-get -f install'"
0
 
Ravi_JaganathanAuthor Commented:
I did, still couldn't install it

christinebovill:/home/ravi# apt-get -f install apache2
Reading package lists... Done
Building dependency tree... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  apache2: Depends: apache2-mpm-worker (>= 2.2.3-4+etch5) but 2.2.3-4+etch4 is to be installed or
                    apache2-mpm-prefork (>= 2.2.3-4+etch5) but it is not going to be installed or
                    apache2-mpm-event (>= 2.2.3-4+etch5) but it is not going to be installed
  apache2-mpm-worker: Depends: apache2.2-common (= 2.2.3-4+etch4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
christinebovill:/home/ravi#
0
 
amprantiCommented:
Probably tou have wrong repositories in your /etc/apt/sources.list

Make a backup of the old one and the use these:


Finally , run:

apt-get update
apt-get install -f
apt-get install apache2






#################### debian stable (ETCH) #################
 
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
 
#################### debian testing  ######################
deb http://ftp.ntua.gr/pub/linux/debian/ testing main non-free contrib

Open in new window

0
 
Ravi_JaganathanAuthor Commented:
hi,

the apt-get install -f did something, but I couldn't execute

apt-get install apache2


christinebovill:/# apt-get install apache2
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 41.5kB of archives.
After unpacking 65.5kB of additional disk space will be used.
Get:1 http://http.us.debian.org stable/main apache2 2.2.3-4+etch5 [41.5kB]
Fetched 41.5kB in 0s (70.2kB/s)
Selecting previously deselected package apache2.
(Reading database ...
dpkg: serious warning: files list file for package `apache2-utils' missing, assuming package has no files currently installed.

dpkg: serious warning: files list file for package `apache2-mpm-worker' missing, assuming package has no files currently installed.

dpkg: serious warning: files list file for package `apache2.2-common' missing, assuming package has no files currently installed.
10937 files and directories currently installed.)
Unpacking apache2 (from .../apache2_2.2.3-4+etch5_all.deb) ...
Setting up apache2 (2.2.3-4+etch5) ...
christinebovill:/#


0
 
Ravi_JaganathanAuthor Commented:
if I use aptitude install apache2

I have segmentation error

I tried to install the packages individually apache2.2-common,apache2-utils' missing, apache2-mpm-worker this didn't work eigher

christinebovill:/# aptitude install apache2
Reading package lists... Done
Building dependency tree... Done
Initializing package states... Done
Reading task descriptions... Done
Building tag database... Done
Segmentation fault
christinebovill:/#
0
 
amprantiCommented:
apt-get install aptitude --reinstall

will fix the problem of aptitude
0
 
Ravi_JaganathanAuthor Commented:
Again, I am surprised to see

dpkg: serious warning: files list file for package `apache2-utils' missing, assuming package has no files currently installed.

while I am tring to reinstall aptitude.




christinebovill:/etc# apt-get install aptitude --reinstall
Reading package lists... Done
Building dependency tree... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 2 not upgraded.
Need to get 0B/2873kB of archives.
After unpacking 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
(Reading database ...
dpkg: serious warning: files list file for package `apache2-utils' missing, assuming package has no files currently installed.
10937 files and directories currently installed.)
Preparing to replace aptitude 0.4.4-4 (using .../aptitude_0.4.4-4_i386.deb) ...
Unpacking replacement aptitude ...
Setting up aptitude (0.4.4-4) ...

0
All Courses

From novice to tech pro — start learning today.