0

I have a PHP-MySQL based single page application (using Angular 6), working on a local network.

We set up the etc/hosts as following:

#127.0.0.1 localhost
#::1 localhost

192.168.0.217   dev.local
::1 dev.local

#127.0.0.1  angular.local
#::1    angular.local

127.0.0.1 localhost
::1 localhost

192.168.0.217   angular.local
::1 angular.local

the angular.local is the application to open on users windows and dev.local to access the PHP script for login, adding, editing,...

The httpd-vhosts is as the following:

# Virtual Hosts
#
<VirtualHost *:80>
  ServerName localhost
  ServerAlias localhost
  DocumentRoot "${INSTALL_DIR}/www"
  <Directory "${INSTALL_DIR}/www/">
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    #Require local
    Allow from 192.168.10.0
    Allow from 192.168.0.217
Require all granted
  </Directory>
</VirtualHost>


#dev.local
<VirtualHost *:80>

    ServerAdmin it@m.org
    DocumentRoot "c:/wamp64/www/dev"
    ServerName dev.local    
    ServerAlias www.dev.local

    <Directory  "c:/wamp64/www/dev/">   
        AllowOverride All
        Require ip 192.168.0
        Require ip 192.168.1    
        Require ip 192.168.10
        Require all granted     
                Allow from all
    </Directory>
</VirtualHost>


#
<VirtualHost *:80>
    ServerName angular.local
    DocumentRoot "c:/wamp64/www/angular/"
    ServerAlias angular.local
    <Directory  "c:/wamp64/www/angular/">
        #Options +Indexes +Includes +FollowSymLinks +MultiViews
        AllowOverride All
        Require ip 192.168
        Require all granted
        Allow from all
    </Directory>
</VirtualHost>

On server side, when running the application, getting about 11000+ records took 1.11 seconds:

enter image description here

On a user computer, where we allowed to him to access the application by changing his etc/hosts file to:

#127.0.0.1  host1
#::1    host1
#127.0.0.1 aff.local
#127.0.0.1 primero.test
#127.0.0.1 localhost
#::1 localhost
127.0.0.1 dev.local

192.168.0.217   angular.local
192.168.0.217 dev.local
::1 angular.local

The request to get the 11000+ records took 13.25 seconds which is a very bad timing:

enter image description here

I did everything written in this answer but still having the same problem, and on some computers it took 25 seconds.

EDIT

As said in this link, I changed all the AllowOverride All to AllowOverride None.

The documentation said:

Then Apache will attempt to open /.htaccess, /www/.htaccess, and /www/htdocs/.htaccess. The solutions are similar to the previous case of Options FollowSymLinks. For highest performance use AllowOverride None everywhere in your filesystem.

But still having the same issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.