Solved

how to find the default webpage in Apache on debian

Posted on 2008-10-07
15
876 Views
Last Modified: 2013-12-16
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 ?
0
Comment
Question by:Ravi_Jaganathan
  • 6
  • 5
15 Comments
 
LVL 6

Expert Comment

by:ixti
ID: 22662352
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
 
LVL 10

Accepted Solution

by:
ampranti earned 125 total points
ID: 22662844
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
 

Author Comment

by:Ravi_Jaganathan
ID: 22664960
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
 
LVL 10

Expert Comment

by:ampranti
ID: 22671563
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
 

Author Comment

by:Ravi_Jaganathan
ID: 22753422
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
 
LVL 10

Expert Comment

by:ampranti
ID: 22753473
Type "apt-get -f install'"
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:Ravi_Jaganathan
ID: 22753484
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
 
LVL 10

Expert Comment

by:ampranti
ID: 22753511
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
 

Author Comment

by:Ravi_Jaganathan
ID: 22797208
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
 

Author Comment

by:Ravi_Jaganathan
ID: 22797627
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
 
LVL 10

Expert Comment

by:ampranti
ID: 22797671
apt-get install aptitude --reinstall

will fix the problem of aptitude
0
 

Author Comment

by:Ravi_Jaganathan
ID: 22797885
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

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now