web.config is one of main GN4 configuration files that determines number of system functionalities.
If you are using standard WEB.CONFIG as supplied in GNPORTAL.ZIP, it will be in \TERA\GN4\WEB\GNPORTAL.
If your structure is drivename:\TERA\GN4\WEB\GNPORTAL
This is a recommended structure for all users that do NOT operate Tera Perforce server for source control.
If your structure is drivename:\TERA\GN4\MAIN\WEB\GNPORTAL
This is a recommended structure for all users that use Tera Perforce server for the source control.
See also
Define server and database (APPSETTINGS.XML)