ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Apache Installed

    Scheduled Pinned Locked Moved IT Discussion
    24 Posts 3 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @Lakshmana
      last edited by

      @Lakshmana said in Apache Installed:

      Ok I will uninstall the Nginx from the machine and how to use the apache ??

      What's not working with Apache? Your description sounded like it was working perfectly. What is wrong with it?

      LakshmanaL 1 Reply Last reply Reply Quote 0
      • LakshmanaL
        Lakshmana @scottalanmiller
        last edited by

        @scottalanmiller I have installed the apache server in the machine and checked the loopback address in the browser and after that the nginx is installed but not configured properly.
        I need to check the status of the apache by deleting any files in the apache file and other things to test in the web browser

        scottalanmillerS 2 Replies Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @Lakshmana
          last edited by

          @Lakshmana said in Apache Installed:

          @scottalanmiller I have installed the apache server in the machine and checked the loopback address in the browser and after that the nginx is installed but not configured properly.

          Well yes, you can only have one and whichever one you start first will be the only one you can see. The other cannot start with the first one is there. Pick the one that you want and remove the other.

          1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller @Lakshmana
            last edited by

            @Lakshmana said in Apache Installed:

            I need to check the status of the apache by deleting any files in the apache file and other things to test in the web browser

            I'm unclear what you want to test. Apache by default has one page and it shows it. You can delete it, but then there is nothing to show. Web servers are very basic, there is very little to test.

            LakshmanaL 1 Reply Last reply Reply Quote 0
            • LakshmanaL
              Lakshmana @scottalanmiller
              last edited by

              @scottalanmiller For the purpose of interview i need to check the process in the apache servers.

              scottalanmillerS 1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller @Lakshmana
                last edited by

                @Lakshmana said in Apache Installed:

                @scottalanmiller For the purpose of interview i need to check the process in the apache servers.

                You don't do that as you describe. Use the ps command to check on the process. Use the netstat command to see if it is listening.

                LakshmanaL 1 Reply Last reply Reply Quote 0
                • LakshmanaL
                  Lakshmana @scottalanmiller
                  last edited by

                  @scottalanmiller When netstat tried in the putty session

                  STREAM CONNECTED 18609

                  STREAM CONNECTED 18562 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 18561

                  STREAM CONNECTED 18555 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18554

                  DGRAM 18548

                  STREAM CONNECTED 18506 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 18505

                  STREAM CONNECTED 18502 @/tmp/.ICE-unix/2597

                  STREAM CONNECTED 18501

                  STREAM CONNECTED 18500 /tmp/orbit-test/linc-a5b-0-3d1bf164df37f

                  STREAM CONNECTED 18499

                  STREAM CONNECTED 18496 /tmp/orbit-test/linc-a40-0-1bd4c3cf39203

                  STREAM CONNECTED 18495

                  STREAM CONNECTED 18463 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18462

                  STREAM CONNECTED 18426 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 18425

                  STREAM CONNECTED 18379 /tmp/orbit-test/linc-a4d-0-50e83f3bc2a7e

                  STREAM CONNECTED 18378

                  STREAM CONNECTED 18375 /tmp/orbit-test/linc-a40-0-1bd4c3cf39203

                  STREAM CONNECTED 18374

                  STREAM CONNECTED 18371 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18370

                  DGRAM 18369

                  STREAM CONNECTED 18363 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18362

                  STREAM CONNECTED 18335 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18334

                  STREAM CONNECTED 18329 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18328

                  STREAM CONNECTED 18321 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 18320

                  STREAM CONNECTED 18259 /tmp/orbit-test/linc-a1c-0-5482815488c47

                  STREAM CONNECTED 18258

                  STREAM CONNECTED 18255 /tmp/orbit-test/linc-a40-0-1bd4c3cf39203

                  STREAM CONNECTED 18254

                  STREAM CONNECTED 18251 /tmp/orbit-test/linc-a47-0-4271396f88616

                  STREAM CONNECTED 18249

                  STREAM CONNECTED 18246 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18245

                  STREAM CONNECTED 18244 /tmp/orbit-test/linc-a40-0-1bd4c3cf39203

                  STREAM CONNECTED 18243

                  STREAM CONNECTED 18239 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 18238

                  STREAM CONNECTED 18233 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 18232

                  STREAM CONNECTED 18087 /tmp/orbit-test/linc-a25-0-26bf0efc3f0d6

                  STREAM CONNECTED 18086

                  STREAM CONNECTED 18083 /tmp/orbit-test/linc-a40-0-1bd4c3cf39203

                  STREAM CONNECTED 18082

                  STREAM CONNECTED 18078 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 18077

                  STREAM CONNECTED 17875 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 17874

                  STREAM CONNECTED 17859 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 17858

                  STREAM CONNECTED 17832 @/tmp/dbus-hUpBBvGHVz

                  STREAM CONNECTED 17831

                  STREAM CONNECTED 17828 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 17827

                  STREAM CONNECTED 17770 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 17769

                  STREAM CONNECTED 17768

                  STREAM CONNECTED 17767

                  STREAM CONNECTED 17741 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 17740

                  STREAM CONNECTED 17637 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 17636

                  DGRAM 17490

                  STREAM CONNECTED 17444 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 17443

                  DGRAM 16946

                  STREAM CONNECTED 16857 @/tmp/gdm-session-PDfbpdGU

                  STREAM CONNECTED 16856

                  STREAM CONNECTED 16854 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 16853

                  DGRAM 16788

                  STREAM CONNECTED 16780 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 16779

                  STREAM CONNECTED 16768 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 16767

                  DGRAM 16766

                  STREAM CONNECTED 16049 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 16048

                  STREAM CONNECTED 16043 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 16042

                  STREAM CONNECTED 15977 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 15975

                  STREAM CONNECTED 15948 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 15947

                  STREAM CONNECTED 15875 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15874

                  STREAM CONNECTED 15849 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15848

                  STREAM CONNECTED 15778 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15777

                  STREAM CONNECTED 15785 @/tmp/.X11-unix/X0

                  STREAM CONNECTED 15776

                  STREAM CONNECTED 15733 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15732

                  STREAM CONNECTED 15591 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15590

                  STREAM CONNECTED 15135 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 15134

                  DGRAM 14709

                  DGRAM 14619

                  DGRAM 14587

                  DGRAM 14583

                  STREAM CONNECTED 14563

                  STREAM CONNECTED 14562

                  STREAM CONNECTED 14559

                  STREAM CONNECTED 14558

                  STREAM CONNECTED 14555

                  STREAM CONNECTED 14554

                  STREAM CONNECTED 14551

                  STREAM CONNECTED 14550

                  STREAM CONNECTED 14547

                  STREAM CONNECTED 14546

                  STREAM CONNECTED 14543

                  STREAM CONNECTED 14542

                  STREAM CONNECTED 14539

                  STREAM CONNECTED 14538

                  STREAM CONNECTED 14535

                  STREAM CONNECTED 14534

                  STREAM CONNECTED 14531

                  STREAM CONNECTED 14530

                  STREAM CONNECTED 14527

                  STREAM CONNECTED 14526

                  STREAM CONNECTED 14523

                  STREAM CONNECTED 14522

                  STREAM CONNECTED 14519

                  STREAM CONNECTED 14518

                  STREAM CONNECTED 14515

                  STREAM CONNECTED 14514

                  STREAM CONNECTED 14511

                  STREAM CONNECTED 14510

                  STREAM CONNECTED 14507

                  STREAM CONNECTED 14506

                  STREAM CONNECTED 14503

                  STREAM CONNECTED 14502

                  STREAM CONNECTED 14499

                  STREAM CONNECTED 14498

                  STREAM CONNECTED 14495

                  STREAM CONNECTED 14494

                  STREAM CONNECTED 14491

                  STREAM CONNECTED 14490

                  STREAM CONNECTED 14487

                  STREAM CONNECTED 14486

                  STREAM CONNECTED 14483

                  STREAM CONNECTED 14482

                  STREAM CONNECTED 14480

                  STREAM CONNECTED 14479

                  STREAM CONNECTED 14476

                  STREAM CONNECTED 14475

                  STREAM CONNECTED 14473

                  STREAM CONNECTED 14472

                  DGRAM 14399

                  DGRAM 14143

                  STREAM CONNECTED 13964 /var/run/acpid.socket

                  STREAM CONNECTED 13963

                  STREAM CONNECTED 13958 @/var/run/hald/dbus-xJOwa81KWB

                  STREAM CONNECTED 13957

                  STREAM CONNECTED 13927 @/var/run/hald/dbus-xJOwa81KWB

                  STREAM CONNECTED 13891

                  STREAM CONNECTED 13644 @/var/run/hald/dbus-38rXXQFNlu

                  STREAM CONNECTED 13643

                  STREAM CONNECTED 13622 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13621

                  DGRAM 13588

                  STREAM CONNECTED 13486 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13485

                  DGRAM 13464

                  STREAM CONNECTED 13390 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13389

                  DGRAM 13388

                  STREAM CONNECTED 13340 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13339

                  STREAM CONNECTED 13327 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13326

                  DGRAM 13322

                  STREAM CONNECTED 13296 /var/run/dbus/system_bus_socket

                  STREAM CONNECTED 13295

                  STREAM CONNECTED 13291

                  STREAM CONNECTED 13290

                  DGRAM 9388

                  DGRAM 9387

                  LakshmanaL thwrT 2 Replies Last reply Reply Quote 0
                  • LakshmanaL
                    Lakshmana @Lakshmana
                    last edited by

                    @Lakshmana
                    [test@localhost ~]$ /etc/init.d/httpd status
                    httpd dead but subsys locked

                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                    • scottalanmillerS
                      scottalanmiller
                      last edited by

                      For netstat, use these options for best results...

                      netstat -tulpn
                      
                      LakshmanaL 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @Lakshmana
                        last edited by

                        @Lakshmana said in Apache Installed:

                        @Lakshmana
                        [test@localhost ~]$ /etc/init.d/httpd status
                        httpd dead but subsys locked

                        Is Nginx still running? If not, was httpd restarted after it was removed?

                        systemctl restart httpd
                        
                        1 Reply Last reply Reply Quote 0
                        • LakshmanaL
                          Lakshmana @scottalanmiller
                          last edited by

                          @scottalanmiller

                          (Not all processes could be identified, non-owned process info
                          will not be shown, you would have to be root to see it all.)
                          Active Internet connections (only servers)
                          Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
                          tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
                          tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
                          tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
                          tcp 0 0 :::80 :::* LISTEN -
                          tcp 0 0 :::22 :::* LISTEN -
                          tcp 0 0 ::1:631 :::* LISTEN -
                          tcp 0 0 ::1:25 :::* LISTEN -
                          udp 0 0 0.0.0.0:631 0.0.0.0:* -
                          udp 0 0 0.0.0.0:68 0.0.0.0:*

                          scottalanmillerS 1 Reply Last reply Reply Quote 0
                          • thwrT
                            thwr @Lakshmana
                            last edited by thwr

                            @Lakshmana please post the output of

                            netstat -anp tcp | grep listening | grep 80

                            assuming you want to run on port 80. Please also post the output of

                            ps ax | grep -v grep | grep -E 'apache|httpd'

                            OK, not required anymore. About the error: ps ax, not ps -ax, my bad

                            LakshmanaL 2 Replies Last reply Reply Quote 0
                            • LakshmanaL
                              Lakshmana @thwr
                              last edited by

                              @thwr [test@localhost ~]$ ps -ax | grep -v grep | grep -E 'apache|httpd'
                              Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ
                              2239 ? Ss 0:00 /usr/sbin/httpd
                              2246 ? S 0:00 /usr/sbin/httpd
                              2247 ? S 0:00 /usr/sbin/httpd
                              2248 ? S 0:00 /usr/sbin/httpd
                              2249 ? S 0:00 /usr/sbin/httpd
                              2250 ? S 0:00 /usr/sbin/httpd
                              2251 ? S 0:00 /usr/sbin/httpd
                              2252 ? S 0:00 /usr/sbin/httpd
                              2253 ? S 0:00 /usr/sbin/httpd

                              1 Reply Last reply Reply Quote 0
                              • LakshmanaL
                                Lakshmana @thwr
                                last edited by

                                @thwr [test@localhost ~]$ netstat -anp tcp | grep listening | grep 80
                                usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
                                netstat [-vnNcaeol] [<Socket> ...]
                                netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]

                                    -r, --route                display routing table
                                    -I, --interfaces=<Iface>   display interface table for <Iface>
                                    -i, --interfaces           display interface table
                                    -g, --groups               display multicast group memberships
                                    -s, --statistics           display networking statistics (like SNMP)
                                    -M, --masquerade           display masqueraded connections
                                
                                    -v, --verbose              be verbose
                                    -n, --numeric              don't resolve names
                                    --numeric-hosts            don't resolve host names
                                    --numeric-ports            don't resolve port names
                                    --numeric-users            don't resolve user names
                                    -N, --symbolic             resolve hardware names
                                    -e, --extend               display other/more information
                                    -p, --programs             display PID/Program name for sockets
                                    -c, --continuous           continuous listing
                                
                                    -l, --listening            display listening server sockets
                                    -a, --all, --listening     display all sockets (default: connected)
                                    -o, --timers               display timers
                                    -F, --fib                  display Forwarding Information Base (default)
                                    -C, --cache                display routing cache instead of FIB
                                    -T, --notrim               stop trimming long addresses
                                    -Z, --context              display SELinux security context for sockets
                                

                                <Iface>: Name of interface to monitor/list.
                                <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom
                                <AF>=Use '-A <af>' or '--<af>'; default: inet
                                List of possible address families (which support routing):
                                inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
                                netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
                                x25 (CCITT X.25)

                                1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Lakshmana
                                  last edited by

                                  @Lakshmana said in Apache Installed:

                                  @scottalanmiller

                                  (Not all processes could be identified, non-owned process info
                                  will not be shown, you would have to be root to see it all.)
                                  Active Internet connections (only servers)
                                  Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
                                  tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
                                  tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
                                  tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
                                  tcp 0 0 :::80 :::* LISTEN -
                                  tcp 0 0 :::22 :::* LISTEN -
                                  tcp 0 0 ::1:631 :::* LISTEN -
                                  tcp 0 0 ::1:25 :::* LISTEN -
                                  udp 0 0 0.0.0.0:631 0.0.0.0:* -
                                  udp 0 0 0.0.0.0:68 0.0.0.0:*

                                  Looks like you are forgetting to be root when doing systems administration tasks. Switch to root before doing any of this.

                                  1 Reply Last reply Reply Quote 1
                                  • thwrT
                                    thwr
                                    last edited by

                                    netstat -an | grep -i tcp | grep -i listening | grep 80
                                    
                                    ps ax | grep -v grep | grep -E 'apache|httpd'
                                    

                                    again, my bad. Could be your grep doesn't support -E, just use

                                    ps ax | grep -v grep | grep apache 
                                    
                                    ps ax | grep -v grep | grep httpd
                                    

                                    instead.

                                    LakshmanaL 1 Reply Last reply Reply Quote 0
                                    • LakshmanaL
                                      Lakshmana @thwr
                                      last edited by

                                      @thwr said in Apache Installed:

                                      ps ax | grep -v grep | grep httpd

                                      [root@localhost ~]# ps ax | grep -v grep | grep apache
                                      [root@localhost ~]# ps ax | grep -v grep | grep httpd
                                      2239 ? Ss 0:00 /usr/sbin/httpd
                                      2246 ? S 0:00 /usr/sbin/httpd
                                      2247 ? S 0:00 /usr/sbin/httpd
                                      2248 ? S 0:00 /usr/sbin/httpd
                                      2249 ? S 0:00 /usr/sbin/httpd
                                      2250 ? S 0:00 /usr/sbin/httpd
                                      2251 ? S 0:00 /usr/sbin/httpd
                                      2252 ? S 0:00 /usr/sbin/httpd
                                      2253 ? S 0:00 /usr/sbin/httpd

                                      1 Reply Last reply Reply Quote 0
                                      • scottalanmillerS
                                        scottalanmiller
                                        last edited by

                                        Okay, so at this point, httpd is definitely running.

                                        1 Reply Last reply Reply Quote 1
                                        • 1
                                        • 2
                                        • 2 / 2
                                        • First post
                                          Last post