Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

replacement virtual port

Questions related to using nuBuilder Forte.
Post Reply
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

replacement virtual port

Unread post by kknm »

There are several nubuilder sites located on the local server. All are registered on virtual port 80. When working on a local network, access can be obtained by site name, but it was necessary to provide access from an external network where this method of connection is not possible. I had to reassign the ports of local sites (81,82,83) in the APACHE configuration. Now those sites that have changed ports have access to the initial page with password and login, but previously existing passwords are invalid. How to return passwords for new ports?
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: replacement virtual port

Unread post by kev1n »

Hi there,

I'm not sure if this is a nuBuilder specific issue or a configuration issue.
I've asked an AI to provide an answer, but haven't checked if it makes any sense and if it will help you:

It sounds like you've encountered a common issue when changing ports and accessing password-protected resources on web servers. Here's a breakdown of the situation and how you can resolve it:

Understanding the Problem

Port Changes and Authentication: Switching Apache ports doesn't directly invalidate existing passwords. However, there are a few ways this change could introduce login problems:
Hardcoded URLs: If your site's code or links have the old port (80) hardcoded, the login page might load, but authentication could fail due to redirect issues after the login attempt.
Cookie/Session Issues: Authentication cookies or sessions might be tied to the original port, leading to invalidation when the port changes.

Database Configuration: Some applications store full URLs (including port) within the database as part of their authentication data.
Troubleshooting and Solutions

Check for Hardcoded URLs:

Search your entire site's codebase for any instances of the old port number (80). Use a text editor or code editor with search functionality.

Update all instances of the old port number found in the code to the new ports (81, 82, 83) as needed.
Look for hardcoded URLs in configuration files or scripts as well.
Clear Cookies and Sessions:

Force users (including yourself) to clear their browser's cookies and cached data for your site's domain.
If your site uses server-side sessions, find where those sessions are stored (file system, database) and clear the relevant data.
Address Database-Stored URLs (If Applicable):

If your site's authentication mechanism stores absolute URLs in its database:

Examine the database tables storing user data or session information.
Carefully update the port numbers within those URLs, ideally using a database tool's "find and replace" functionality. Be very careful with this step, as making incorrect changes here could break your site.
Additional Considerations:

.htaccess: If your sites use .htaccess files for redirects or URL manipulation, ensure any port-specific rules in those files are updated.
Web Application Firewalls (WAF): If a WAF is in use, check its settings—it might be configured in a way that's sensitive to the port changes.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: replacement virtual port

Unread post by kknm »

I searched the nubuilder database for entries by URL and ports and found only 127.0.0.1.
Reset all cookies and saved data for the browser. Nothing helps.
BUT !!!
I found a way to return passwords - when accessing a site, write the port number after the name.
Passwords are valid.
Post Reply