• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Configure Apache URL Redirection on Oracle Linux 8.8

  • 00:39 cat /etc/os-release
  • 00:57 yum install httpd -y
  • 01:30 systemctl start httpd
  • 01:37 systemctl enable httpd
  • 01:46 systemctl status httpd
  • 02:06 systemctl stop firewalld
  • 02:17 systemctl disable firewalld
  • 02:33 setenforce 0
  • 02:59 cd /var/www/html/
  • 03:10 vim index.html
  • 03:44 chown -R apache:apache index.html
  • 04:03 chmod -R 775 index.html
  • 04:44 vim /etc/httpd/conf.d/test.conf
  • 05:32 systemctl restart httpd
  • 06:40 vim /etc/httpd/conf.d/test.conf
  • 07:41 systemctl restart httpd
{{postValue.id}}

To Configure Apache URL Redirection on Oracle Linux 8.8

Introduction:

Apache is a well-supported, feature-rich, and flexible web server that is widely used worldwide. It is helpful for users to view each piece of customized content when designing your web pages.

Installation Procedure:

Step 1: Check the OS Version by using the below command

[root@linuxhelp ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.8"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:8:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://github.com/oracle/oracle-linux"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.8
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.8

Step 2: Install the Apache Web server package by using the below command

[root@linuxhelp ~]# yum install httpd -y
Installed:
  apr-1.6.3-12.el8.x86_64                                                                 
  apr-util-1.6.1-6.el8.x86_64                                                             
  httpd-2.4.37-47.0.1.module+el8.6.0+20683+407db9f5.2.x86_64                              
  httpd-filesystem-2.4.37-47.0.1.module+el8.6.0+20683+407db9f5.2.noarch                   
  httpd-tools-2.4.37-47.0.1.module+el8.6.0+20683+407db9f5.2.x86_64                        
  mod_http2-1.15.7-5.module+el8.6.0+20548+01710940.x86_64                                 
  oracle-logos-httpd-84.5-1.0.1.el8.noarch                                                
Complete!

Step 3: Start and enable the Status of Apache service by using the below command

[root@linuxhelp ~]# systemctl start httpd
 [root@linuxhelp ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
 [root@linuxhelp ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor prese>
   Active: active (running) since Thu 2023-07-27 02:11:37 IST; 16s ago
     Docs: man:httpd.service(8)
 Main PID: 128840 (httpd)
   Status: "Running, listening on: port 80"
    Tasks: 213 (limit: 22942)
   Memory: 17.1M
   CGroup: /system.slice/httpd.service
           ├─128840 /usr/sbin/httpd -DFOREGROUND
           ├─128847 /usr/sbin/httpd -DFOREGROUND
           ├─128848 /usr/sbin/httpd -DFOREGROUND
           ├─128849 /usr/sbin/httpd -DFOREGROUND
           └─128850 /usr/sbin/httpd -DFOREGROUND

Jul 27 02:11:37 linuxhelp systemd[1]: Starting The Apache HTTP Server...
Jul 27 02:11:37 linuxhelp httpd[128840]: AH00558: httpd: Could not reliably det>
Jul 27 02:11:37 linuxhelp systemd[1]: Started The Apache HTTP Server.
Jul 27 02:11:38 linuxhelp httpd[128840]: Server configured, listening on: port >

Step 4: Disable and Stop Firewall and SELinux by using the below command

[root@linuxhelp linuxhelp]# systemctl stop firewalld
 [root@linuxhelp linuxhelp]# systemctl disable firewalld
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@linuxhelp linuxhelp]# setenforce 0

Step 5: Create html file for document root in .html format by using the below command

[root@linuxhelp]# cd /var/www/html/
[root@linuxhelp html]# vim index.html

Snap1

Step 6: Change ownership and give Execute permission for this file by using the below command.

[root@linuxhelp html]# chown -R apache:apache index.html
[root@linuxhelp html]# chmod -R 775 index.html

Step 7: Go to the configuration location and create test.conf file by using the below command.

[root@linuxhelp html]# vim /etc/httpd/conf.d/test.conf
<virtualhost *:80>
servername linuxhelp1.com
Documentroot /var/www/html/
</virtualhost>

Step 8: Restart the Apache service for changes by using the below command

[root@linuxhlep conf.d]# systemctl restart httpd

Step 9: After restarting the service open your web browser and navigate to the URLs Domain name or IP address. You should see the sample demo page which we created earlier. Snap2

Step 10: To Configure Apache URL redirection use the below command and Create the following Apache redirect rules on configuration file, Snap3

Step 11: Restart the Apache service by using the below command

[root@linuxhlep conf.d]# systemctl restart httpd

Step 12: After restarting the service, open your web browser and navigate to the URLs Domain name or IP address as shown in the below image.

Snap 5 Snap 4

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Configure Apache URL Redirection on Oracle Linux 8.8. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How does Apache redirect work?

A

In Apache, you can implement single-page redirects using the “Redirect” directive, which is included in the mod_alias module that is enabled by default

Q

How do redirects work?

A

Redirect is a set of instructions that are executed when the request hits the server, automatically re-routing to a different page.

Q

Can I redirect a domain without hosting?

A

Depending on your domain registration you can do URL forwarding

Q

Can one website have two domain names?

A

You absolutely can have multiple domain names.

Q

Who owns Apache now?

A

Apache is now owned by APA Corporation

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Gibbson ?
How do i run both nginx and apache in same instance on centos

Hi...,

my server is based centos operating system and my webserver is already running on Apache.... i need to run both apache and nginx on same instance ... please help me to implement this concept...

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.