Search Results

Search found 3 results on 1 pages for 'coderama'.

Page 1/1 | 1 

  • My ubuntu server is losing connectivity, require assistance troubleshooting

    - by Coderama
    I have two server monitoring tools that check the uptime of my Ubuntu 10.04.1 LTS server. Over the last month both of these tools have reported the following outages: Jan - 15mins: self recovery Jan - 5 mins: self recovery Feb - 15mins: I managed to be online when this happened and logged into my control panel to find that my server was shutdown. I manually restarted it only because I was online. I wonder if it would have restarted? I have contacted my VPS provider (webbynode) who could not see any any problems with their VPS infrastructure for the February outage. I have also checked the following log files to see if there are any anomalies that could be the cause of the outages; I am unable to see anything related to the server shutdown (Feb) in these logs: /var/log/auth.log /var/log/apache2/error.log /var/log/syslog /var/log/kern.log /var/log/boot /var/log/messages Could anyone suggest any other things I should look out for, such as additional system logs? I just added bootlogging through /etc/default/bootlogd

    Read the article

  • MySQL: selecting totals as three fields from same table as one query?

    - by coderama
    I have a table with various orders in it: ID | Date | etc... 1 | 2013-01-01 | etc 2 | 2013-02-01 | etc 3 | 2013-03-01 | etc 4 | 2013-04-01 | etc 5 | 2013-05-01 | etc 6 | 2013-06-01 | etc 7 | 2013-06-01 | etc 8 | 2013-03-01 | etc 9 | 2013-04-01 | etc 10 | 2013-05-01 | etc I want a query that ends wit the result: overallTotal | totalThisMonth | totalLastMonth 10 | 2 | 1 But I want to do this in one query! I am trying to find a way to use subqueries to do this. SO far I have: SELECT * from ( SELECT count(*) as overallTotal from ORDERS ) How can I combine this with other subqueries so I can get the totals in one query?

    Read the article

  • How to limit Access-Control-Allow-Origin to a specific path?

    - by coderama
    I have a website that servies ads via javascript. So, I basically allow the user to include my script.... : <script src="http://www.example.com/ads.js" ></script> <script> MYADDS.insertAdvert(); </script> The problem is, I kept getting: "No Access-Control-Allow-Origin" Errors. That was until I added this to my htaccess file: <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> Problem is, this opens up my entire site and is probably a security risk. So, seeing as the ads.js file actually only does an ajax request to: http://www.example.com/place/where/my/adds/are/fed/from How can I make the above htaccess rule only apply to that path? Keep in mind, it's not an actualy directory, so I can't put the htaccess file in that folder. It's actually a "virtual path". The site is built using Laravel and therefore does the typical laravel path rewriting. Here's teh full htaccess file: <IfModule mod_rewrite.c> <IfModule mod_negotiation.c> Options -MultiViews </IfModule> RewriteEngine On # Redirect Trailing Slashes... RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> Any ideas how to do this?

    Read the article

1