Using AJAX to generate front end / viewer end pages

Your are pointing to a non existing AJAX file.

$.ajax( {
     // ...
     url : '/path/myfile.php',
     // ...
} );

WordPress has a predefined file for that:

admin_url( 'admin-ajax.php' )

When you are running public queries, then you need to add it to

wp_localize_script( 'your-script-handle', 'yourJavaScriptAccessibleObject', array(
    'ajaxurl' => esc_js( admin_url( 'admin-ajax.php' ) ),
) );

If you are just running admin facing calls, then you can even leave that out and simply use

ajaxurl

in your JavaScript file as the variable is prefilled. In case you have a single setup, you can use this hack for Apaches .htaccess file.

Keep in mind that you want to secure your AJAX calls by using a NONCE:

'_ajax_nonce' => wp_create_nonce( 'your-script-handle' ),