Answer the question
In order to leave comments, you need to log in
AJAX not working under Apache2?
AJAX does not work under Apache2. Status code: 0, status: failed. I can't figure out what the problem is. On other sites on the same server, everything works as it should. The request is not cross-domain, of the form
url: '/ajax/do/delete'
Here is the site config:
<VirtualHost *:80>
ServerName site.com
DocumentRoot /var/www/site.com
<Directory /var/www/site.com/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Found a reason. Sorry for my inattention. AdBlock just blocked all my requests. After turning it off, everything worked. Thank you all for your response.
AJAX is a normal request, the main difference is only in the headers sent to the server ($_SERVER["HTTP_X_REQUESTED_WITH"]).
Get Firefox+Firebug (Network tab) or another tool and browser. Send a request and see what comes up there. Most likely you have an error in the code, and some kind of exception is thrown along with the response.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question