reactjs – 404 when updating the React app. Server with nginx,

I am creating a website with pure React. already mounted on the server, together with other domains and (small) applications seems to work well.

If I forward to a secondary site, everything is fine. BUT when I reload with F5 or with the mouse. Send me 404 not found the requested path

This is the nginx configuration. I have to admit that I have repeated it several times. I am not sure if there is duplicate code and this is the error.

I've tried many different things too, but nothing seems to change the result.

upstream mipagina.com {
  server 159.xx.xx.xx:xxxxx;
}
server {
  server_name mipagina.com www.mipagina.com;

#  try_files $uri $uri/ /publicidad/index.html;
  access_log /var/log/nginx/mipagina.access.log;
  error_log /var/log/nginx/mipagina.error.log debug;
  location / {
#       autoindex on;
        root /publicidad/;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarder-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $http_host;
    proxy_set_header X-NginX-Proxy true;
    proxy_pass http://mipagina.com;
    proxy_redirect off;
  }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/mipagina.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mipagina.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
    if ($host = mipagina.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
}

Disable the Adsense ad code in 404 deleted posts and pages

I recently deleted some older posts. Now the AdSense crawler shows an ongoing error, so I used code to block AdSense on 404 pages.

I found an online solution

The PHP code snippet that hides / blocks Adsense ads on 404 is:

Add your ADSENSE code here

Note: The logic of the code is to run Adsense on all pages except the 404s!

And paste the following code into the functions.php file.

add_filter ("widget_text", "execute_php", 100);
Function execute_php ($ html) {
if (strpos ($ html, ”)<“.”?php”)!==false){ ob_start(); eval(“?”.”>”. $ Html);
$ html = ob_get_contents ();
ob_end_clean ();
}}
return $ html;
}}

(This code triggers an error —- Your PHP code changes were reset due to an error in line 123 of the file wp-content / theme / generatepress / functions.php. Please correct and try again to save.

Syntax error, unexpected & # 39;) & # 39;

html – Not redirected to the user's profile page when the "Posted by:" link is clicked, but to the 404 default page I created

I am creating a social blog. I successfully displayed users and redirected them to the post they clicked on the main page. However, I'm stuck forwarding him or her to the creator of the post page (where is the entire blog that the creator posted)?. I had thought about it for days. I can't really meet anyone at this difficult time, so I would be very happy if you can help me. Thank you very much!!

P / s. I really think there's something wrong with it when I write username = first name + middle name + last name. If the function works, the URL of the page should be: / LoveComputerScience, not /users.fist_name….users.middle_name…users.last_name.

Here are my codes for my models (databases):

class User(db.Model, UserMixin):
    __tablename__ = 'users'

    id = db.Column(db.Integer, primary_key=True)
    profile_image = db.Column(db.String(64), nullable=False, default='default_profile.jpg' ) 
    email = db.Column(db.String(64), unique=True, index=True) 
    first_name = db.Column(db.String(20))
    last_name = db.Column(db.String(20))
    middle_name = db.Column(db.String(20))
    username = first_name+middle_name+last_name
    password_hash = db.Column(db.String(128))

    posts = db.relationship('BlogPost', backref='creator', lazy=True) 

    def __init__(self,email,first_name,last_name, password):     
        self.email = email
        self.first_name = first_name
        self.last_name = last_name
        self.password_hash = generate_password_hash(password)

    def check_password(self, password):
        return check_password_hash(self.password_hash, password)

    def __repr__(self):
        return f"Username: {self.username}"



class BlogPost(db.Model):

    users = db.relationship(User)

    blog_id = db.Column(db.Integer, primary_key=True)
    user_id = db.Column(db.Integer,db.ForeignKey('users.id'), nullable=False)  
    date = db.Column(db.DateTime, nullable=False, default=datetime.utcnow)  
    problem_name = db.Column(db.String(140), nullable=False)
    text = db.Column(db.Text, nullable=False)

    def __init__(self, text, problem_name, user_id):
        self.text = text
        self.problem_name = problem_name
        self.user_id = user_id

    def __repr__(self):
        return f"Post ID: {self.post_id} -- Date:{self.date}---{self.problem_name}"

Here are my codes for my templates that show the link that the user can click and see the creator. (It is the homepage where every blog is displayed) (Posted by: {{post.creator.first_name}} {{post.creator.middle_name}} {{post.creator.last_name}}):

....Exendting from base.html(nav,style....)
{% for post in many_posts.items %}
    


{% endfor %}

Here are my codes for my views / routes of the function:

@users.route('/')
def user_posts(username):

    page = request.args.get('page',1,type=int) #request 1 page to scroll
    home_user = User.query.filter_by(username=username).first_or_404() #check if the user is created  #THIS IS WORKIING SO IT MEANS SOMETHING IS WRONG ABOUT THE username=username

    blog_posts = BlogPost.query.filter_by(creator=home_user).order_by(BlogPost.date.desc()).paginate(page=page, per_page=5) #make sure you can scroll and see 5 pages using paginate
    return render_template('user_blog_posts.html', blog_posts=blog_posts, home_user=username)

These images below show what happens when I click the creator's link:

Homepage where all articles are displayed:
Homepage on which all posts are displayed

The 404 page that appears when I click "Posted by: Love Computer Science" should display the Love Computer Science user page:
The 404 page that appears when I click "Posted by: Love Computer Science" should display the Love Computer Science user page

The function of clicking the "Read More" button worked:
The function of clicking the "Read More" button worked

Dear name configuration of computer science:
Love the names of computer science

Ebay Inventory API "Get inventory item" 404 Not found

When I tryping to request API inventory with API Exploler from eBay. I receive the Call Respond Statud code 404.

and the following error message. can someone help me solve the problem

{"errors": [
 {
  "errorId": 25710,
  "domain": "API_INVENTORY",
  "subdomain": "Selling",
  "category": "REQUEST",
  "message": "We didn't find the entity you are requesting. Please verify the request"
} ]}

Executing a sudo apt update error leads to Err: 19 http://archive.ubuntu.com/ubuntu cosmic Release 404 Not Found [IP: 91.189.88.31 80]

sudo apt update
Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease                        
Ign:3 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu cosmic InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable Release                     
Hit:5 http://archive.ubuntu.com/ubuntu xenial-updates InRelease                
Ign:6 https://dl.bintray.com/sbt/debian  InRelease                             
Hit:7 http://archive.canonical.com/ubuntu xenial InRelease                     
Hit:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease              
Hit:9 https://nvidia.github.io/libnvidia-container/ubuntu18.04/amd64  InRelease
Get:10 https://dl.bintray.com/sbt/debian  Release (815 B)                      
Ign:11 http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu cosmic InRelease   
Hit:12 https://download.mono-project.com/repo/ubuntu stable-bionic InRelease   
Hit:14 https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/amd64  InRelease
Hit:15 http://archive.ubuntu.com/ubuntu xenial-security InRelease              
Hit:16 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64  InRelease     
Ign:17 http://archive.ubuntu.com/ubuntu cosmic InRelease                       
Hit:18 http://ppa.launchpad.net/system76/pop/ubuntu cosmic InRelease           
Err:19 http://archive.ubuntu.com/ubuntu cosmic Release                         
  404  Not Found (IP: 91.189.88.31 80)
Hit:20 https://download.sublimetext.com apt/stable/ InRelease                  
Ign:21 http://ppa.launchpad.net/transmissionbt/ppa/ubuntu cosmic InRelease
Hit:22 http://ppa.launchpad.net/webupd8team/java/ubuntu cosmic InRelease      
Err:24 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu cosmic Release
  404  Not Found (IP: 91.189.95.83 80)
Err:25 http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu cosmic Release     
  404  Not Found (IP: 91.189.95.83 80)
Err:26 http://ppa.launchpad.net/transmissionbt/ppa/ubuntu cosmic Release
  404  Not Found (IP: 91.189.95.83 80)
Reading package lists... Done                       
E: The repository 'http://archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/sylvain-pineau/kazam/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/transmissionbt/ppa/ubuntu cosmic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I'm mainly worried about Err: 19 http://archive.ubuntu.com/ubuntu cosmic release
404 not found (IP: 91.189.88.31 80)

I was trying to change archive.ubuntu in sources.list to old-releases.ubuntu and that didn't help

netbeans – HTTP 404 Status – Not Found

I am developing a project in Netbeans. I'm using Wildfly, but it gives me the following message

HTTP 404 status – Not found
Enter the status report

message / start.jsp

Description The required resource is not available.

Apache Tomcat / 7.0.99

I am new to this area but cannot find a solution
I have my project folder in the NetBeans folder
and enter localhost: 8080 / maps / start.jsp

Someone who knows how to fix it would appreciate it very much

nginx – ngnix api ssl conf – api returns 404

I have a problem with my nginx conf in combination with Certbot and an SSL API.

You can see my Nginx configuration here:https://dpaste.org/E2nP#L10

I have an API at / root / api / This is configured to run with SSL and my local certificate can be loaded easily.

I have used certbot to install certificates for web traffic on the server and everything loads well. I also use the same certificates for the API. When certbot renews / creates them, they are copied into /api/cong/ssl applied with the appropriate permissions. The API is loading correctly and appears to be running.

My problem is when I try to load web pages to call the API, or load the API directly over HTTPs I get 404s. I still couldn't figure out what's going on.

A sample log file for some API requirements can be found here https://dpaste.org/4EiW