Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8469181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:09:04+00:00 2026-06-10T16:09:04+00:00

I have a server from AWS EC2 service running on Linux ubuntu and I

  • 0

I have a server from AWS EC2 service running on Linux ubuntu and I have installed apache, php, and mysql.

I have added a .htaccess file in my document root /var/www/html.

I entered this code in it:
ErrorDocument 404 /var/www/html/404.php and it is still not showing up.

I kept entered this command multiple times: sudo service httpd restart to restart the server but no changes displayed…

How can I fix this… Did I do something wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T16:09:06+00:00Added an answer on June 10, 2026 at 4:09 pm

    First, note that restarting httpd is not necessary for .htaccess files. .htaccess files are specifically for people who don’t have root – ie, don’t have access to the httpd server config file, and can’t restart the server. As you’re able to restart the server, you don’t need .htaccess files and can use the main server config directly.

    Secondly, if .htaccess files are being ignored, you need to check to see that AllowOverride is set correctly. See http://httpd.apache.org/docs/2.4/mod/core.html#allowoverride for details. You need to also ensure that it is set in the correct scope – ie, in the right block in your configuration. Be sure you’re NOT editing the one in the block, for example.

    Third, if you want to ensure that a .htaccess file is in fact being read, put garbage in it.
    An invalid line, such as “INVALID LINE HERE”, in your .htaccess file, will result in a 500 Server Error when you point your browser at the directory containing that file. If it doesn’t, then you don’t have AllowOverride configured correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently had a linux server compromised from bots uploading .php scripts and
I have development server (from google appengine sdk), running on my Ubuntu computer. I
I am migrating my Java,Tomcat, Mysql server to AWS EC2. I have already attached
I have a CakePHP app that is being moved to Sql Server from MySql.
I have a production database server running on MYSQL 5.1, now we need to
I am running php scripts in parallel on an AWS lamp server. Right now
Hi have 1 EC2 instance that is stopped. (Ubuntu Rails App Server (ami-e49e758d)) But
I have an AWS EC2 instance running. I've tried to make a connection to
I have a web app running on php and mysql. i have tested on
I have migrated Project server from one server to another. I am able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.