Running the Apache Server on port 81 


apacheg.png apg

To run Apache Server on port 81, it is a good idea to create a SHORTCUT on your system's DESKTOP.


 H:/ 

Open this folder:

H:/Apache648

ap808.png apb


 H:/Apache648/ 

See:

H:/Apache648/Apache24

Open the folder:

H:/Apache648/Apache24/bin

ap809.png apb


 H:/Apache648/Apache24/bin/ 

Right-click

the file:

H:/Apache648/Apache24/bin/httpd.exe

ap810.png apb


 H:/Apache64/Apache24/bin/ 

This file:

H:/Apache64/Apache24/bin/httpd.exe

Choose:

Copy

ap811.png apb


 Desktop -> Paste shortcut 

Right-click

on the

Desktop

and chose:

Paste shortcut

ap812.png apb


 Desktop -> httpd.exe - Shortcut (2) 

The

httpd.exe - Shortcut (2)

is then created on the

Desktop

ap813.png apb


 Desktop -> httpd.exe - Shortcut 

You can change the names of the two shortcuts then present to know when to use one and the other.


 Desktop -> httpd.exe - Shortcut (2) 

Double-click

the

httpd.exe - Shortcut (2)

to activate the

Apache Server on port 81

ap814.png apb


 Apache Server Terminal is Open 

The

Apache Server Terminal on port 81

it is then open, ready to operate.

ap815.png apb


 Apache Server Terminal is Open 

The

Apache Server Terminal on port 81

must be kept open while in use.

In order not to disturb the viewing of other applications, it must therefore be kept minimized on the

Taskbar

So minimize it.




Next, we'll show you how to use Apache Server on port 81 to run a PHP script.


 Taskbar -> Apache Server Terminal Minimized 

The

Apache Server Terminal on port 81

must be kept minimized while in use.

Soon we will say how to safely close it.

ap816.png apb


 Open your favorite browser 

To test whether the

Apache Server on port 81

can 'see'

PHP scripts

open your preferred browser.

ap817.png apb


 localhost:81 

Enter the URL:

localhost:81

ap818.png apb


 localhost:81 

This URL will allow to display the file

H:/WEB/public_html/index.php

which is intended to show all of its content viewed as public.

The contents of this file will be shown, just after entering the URL followed by ENTER .

ap819.png apb


 localhost:81/info.php 

Now, enter the URL:

localhost:81/info.php

ap820.png apb

This URL allows the display of a table with information about PHP.


 localhost:81/info.php 

With the display of this table, it is proven that the

Apache Server on port 81

runs

PHP 8

scripts perfectly.

ap821.png apb

For now, you can close your browser.


 Taskbar -> Open the Apache Server Terminal 

Maximize

Apache Server Terminal on port 81

then minimized on the

Taskbar

apa822.png apb


 Closing the Apache Server Terminal 

To close the

Apache Server Terminal on port 81

then, maximized.

The traditional way of closing can be used, of course.

ap823.png apb


 System logs 

To see the automatic logs generated by the system, you must access the folder:

 H:/Apache648/logs 

ap824.png apb


 H:/Apache648/logs 

 H:/Apache648/logs/access.log 

This file is created the first time the Apache Server on port 81 is started and self-implemented each time it is shut down and then restarted.

ap825.png apb

It has the following format:



. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

::1 - - [21/Feb/2021:13:01:48 -0300] 
                    "GET /info.php HTTP/1.1" 200 24583
::1 - - [21/Feb/2021:13:01:49 -0300] 
                    "GET /favicon.ico HTTP/1.1" 200 1652

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 H:/Apache648/logs 

 H:/Apache648/logs/error.log 

This file is created the first time the Apache Server on port 81 is started and self-implemented each time it is shut down and then restarted.

ap826.png apb

It has the following format:



. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

[Sun Feb 21 12:51:51.492034 2021] [mpm_winnt:notice] [pid 26244:tid 628] 
AH00455: Apache/2.4.46 (Win64) PHP/8.0.2 configured -- resuming normal operations
[Sun Feb 21 12:51:51.492034 2021] [mpm_winnt:notice] [pid 26244:tid 628] 
AH00456: Apache Lounge VS16 Server built: Aug  2 2020 10:21:32
[Sun Feb 21 12:51:51.492034 2021] [core:notice] [pid 26244:tid 628] 
AH00094: Command line: 'H:\\Apache648\\Apache24\\bin\\httpd.exe -d H:/Apache648/Apache24'
[Sun Feb 21 12:51:51.493975 2021] [mpm_winnt:notice] [pid 26244:tid 628] 
AH00418: Parent: Created child process 24912
Apache server interrupted...
021] [mpm_winnt:notice] [pid 24912:tid 680] 
AH00354: Child: Starting 64 worker threads.
[Sun Feb 21 12:52:01.715993 2021] [mpm_winnt:notice] [pid 26244:tid 628] 
AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Feb 21 12:52:03.727013 2021] [mpm_winnt:notice] [pid 24912:tid 680] 
AH00364: Child: All worker threads have exited.
[Sun Feb 21 12:52:03.824105 2021] [mpm_winnt:notice] [pid 26244:tid 628] 
AH00430: Parent: Child process 24912 exited successfully.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

 H:/Apache648/logs 

 H:/Apache648/logs/httpd.pid 

This file which is intended to store the Apache Server on port 81 PID, (Process ID).

This means that it is always created, at the opening of the terminal and eliminated at its closure.

ap827.png apb

It has the following format:



18484


If you wish, you can check these files whenever you want.

To have complete control of what is displayed by each of these files, it is best to observe them with the Apache Server on port 81 out of operation.

Remember that the httpd.pid file is only active when the Apache Server on port 81 is in operation.



To update the Apache Server on port 81, you must follow the same steps used to update the Apache Server on port 80.

However, you must take care not to mix the configuration files, as these are particular to each installation.

That's it for now