Apache: How to remove port number from URL



  • I've done some research and people tell me to configure the Apache proxy. However, whenever I configure the proxy (using XAMPP) I get a "500" error. I have no idea what I'm doing wrong here. Can someone please help?

    My configuration
    0_1502231386380_1.PNG

    the error
    0_1502231394676_2.PNG



  • Did you check your Apache error logfile? It's probably in /var/log/apache2/error.log (depending on your distro).



  • @bartvb

    [Wed Aug 09 19:48:27.905748 2017] [ssl:warn] [pid 12024:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 19:48:28.476820 2017] [ssl:warn] [pid 12024:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 19:48:30.549078 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00455: Apache/2.4.26 (Win32) OpenSSL/1.0.2l PHP/7.1.7 configured -- resuming normal operations
    [Wed Aug 09 19:48:30.549078 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00456: Apache Lounge VC14 Server built: Jun 15 2017 12:39:41
    [Wed Aug 09 19:48:30.549078 2017] [core:notice] [pid 12024:tid 428] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
    [Wed Aug 09 19:48:30.550077 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00418: Parent: Created child process 11632
    [Wed Aug 09 19:48:30.971411 2017] [ssl:warn] [pid 11632:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 19:48:31.099223 2017] [ssl:warn] [pid 11632:tid 344] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 19:48:31.400701 2017] [mpm_winnt:notice] [pid 11632:tid 344] AH00354: Child: Starting 150 worker threads.
    [Wed Aug 09 19:48:31.409709 2017] [proxy:warn] [pid 11632:tid 1744] [client 66.150.214.135:64592] AH01144: No protocol handler was valid for the URL /socket.io/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://outcastsroleplay.com/
    [Wed Aug 09 19:48:31.409709 2017] [proxy:warn] [pid 11632:tid 1744] [client 66.150.214.135:64592] AH01144: No protocol handler was valid for the URL /error/HTTP_INTERNAL_SERVER_ERROR.html.var. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://outcastsroleplay.com/
    [Wed Aug 09 19:48:33.274035 2017] [proxy:warn] [pid 11632:tid 1744] [client 74.214.146.180:49365] AH01144: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
    [Wed Aug 09 19:48:33.274035 2017] [proxy:warn] [pid 11632:tid 1744] [client 74.214.146.180:49365] AH01144: No protocol handler was valid for the URL /error/HTTP_INTERNAL_SERVER_ERROR.html.var. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
    [Wed Aug 09 19:48:33.975626 2017] [proxy:warn] [pid 11632:tid 1744] [client 66.150.214.135:64595] AH01144: No protocol handler was valid for the URL /socket.io/. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://outcastsroleplay.com/
    [Wed Aug 09 19:48:33.975626 2017] [proxy:warn] [pid 11632:tid 1744] [client 66.150.214.135:64595] AH01144: No protocol handler was valid for the URL /error/HTTP_INTERNAL_SERVER_ERROR.html.var. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule., referer: http://outcastsroleplay.com/
    


  • Do you have the proxy and proxy_http modules enabled? On Ubuntu/Debian:

    $ sudo a2enmod proxy  
    $ sudo a2enmod proxy_http
    


  • @bartvb
    I'm running on Windows Server (I know, I know. Awful choice. But ArmA 3 servers don't run well on linux distros 😢)

    Do you know how to enable this on XAMPP Apache?



  • Good point :)

    First Google hit:



  • @bartvb
    Hmm, now I'm getting this

    [Wed Aug 09 20:01:44.065504 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00422: Parent: Received shutdown signal -- Shutting down the server.
    [Wed Aug 09 20:01:46.068198 2017] [mpm_winnt:notice] [pid 11632:tid 344] AH00364: Child: All worker threads have exited.
    [Wed Aug 09 20:01:46.475486 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00430: Parent: Child process 11632 exited successfully.
    [Wed Aug 09 20:01:52.228284 2017] [ssl:warn] [pid 6116:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:01:52.262213 2017] [proxy_balancer:emerg] [pid 6116:tid 428] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:01:52.262213 2017] [:emerg] [pid 6116:tid 428] AH00020: Configuration Failed, exiting
    [Wed Aug 09 20:02:29.518420 2017] [ssl:warn] [pid 6680:tid 436] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:02:29.549357 2017] [core:warn] [pid 6680:tid 436] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Wed Aug 09 20:02:29.550355 2017] [proxy_balancer:emerg] [pid 6680:tid 436] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:02:29.550355 2017] [:emerg] [pid 6680:tid 436] AH00020: Configuration Failed, exiting
    [Wed Aug 09 20:03:16.687985 2017] [ssl:warn] [pid 11164:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:03:16.719911 2017] [core:warn] [pid 11164:tid 432] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Wed Aug 09 20:03:16.721914 2017] [proxy_balancer:emerg] [pid 11164:tid 432] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:03:16.721914 2017] [:emerg] [pid 11164:tid 432] AH00020: Configuration Failed, exiting
    

    Apache won't run now



  • @deadvcr said in Apache: How to remove port number from URL:

    @bartvb
    Hmm, now I'm getting this

    [Wed Aug 09 20:01:44.065504 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00422: Parent: Received shutdown signal -- Shutting down the server.
    [Wed Aug 09 20:01:46.068198 2017] [mpm_winnt:notice] [pid 11632:tid 344] AH00364: Child: All worker threads have exited.
    [Wed Aug 09 20:01:46.475486 2017] [mpm_winnt:notice] [pid 12024:tid 428] AH00430: Parent: Child process 11632 exited successfully.
    [Wed Aug 09 20:01:52.228284 2017] [ssl:warn] [pid 6116:tid 428] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:01:52.262213 2017] [proxy_balancer:emerg] [pid 6116:tid 428] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:01:52.262213 2017] [:emerg] [pid 6116:tid 428] AH00020: Configuration Failed, exiting
    [Wed Aug 09 20:02:29.518420 2017] [ssl:warn] [pid 6680:tid 436] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:02:29.549357 2017] [core:warn] [pid 6680:tid 436] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Wed Aug 09 20:02:29.550355 2017] [proxy_balancer:emerg] [pid 6680:tid 436] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:02:29.550355 2017] [:emerg] [pid 6680:tid 436] AH00020: Configuration Failed, exiting
    [Wed Aug 09 20:03:16.687985 2017] [ssl:warn] [pid 11164:tid 432] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
    [Wed Aug 09 20:03:16.719911 2017] [core:warn] [pid 11164:tid 432] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Wed Aug 09 20:03:16.721914 2017] [proxy_balancer:emerg] [pid 11164:tid 432] AH01177: Failed to lookup provider 'shm' for 'slotmem': is mod_slotmem_shm loaded??
    [Wed Aug 09 20:03:16.721914 2017] [:emerg] [pid 11164:tid 432] AH00020: Configuration Failed, exiting
    

    Apache won't run now

    Nevermind, I see. I had to enable mod_slotmem_shm.

    Now I'm running into another problem, I can't seem to access other pages I had (for example http://example.com/donate/)

    Hmm, how could I fix this?



  • The easiest solution (and probably also the best for SEO purposes) is to put your forum on a subdomain, i.e. forum.example.com

    If you want everything on the same server it really depends on the rest of your site. Are these real files that you want to serve? Are these files generated by a CMS? Etc.


Log in to reply
 


Looks like your connection to NodeBB was lost, please wait while we try to reconnect.