Open monecchi opened 10 years ago
Ok a few things you need to look at:
Hello. Thanks for your tips and explanation. I'll set up a subdomain on my server and create a new nginx server block (such as an apache virtual host) for this purpose only.
Regarding the .htaccess configuration part, where is it handled? Do you mean the true .htaccess file which lies on the root directory of most apache servers or the htaccess configuration is manipulated on one of the php files? I'm afraid things are handle differently on nginx, but I'll ask for help on stackoverflow's serverfault/wp dev sites and make a research by myself too.
That's a good hint about the authorization code, I had a huge doubt about it the first time I adjusted the plugin settings.
So do you mean I should put 'urlargs' inside of this line such as follows?
define('WEBSERVICE_URL', 'urlargs');
For now I say thanks a lot for your help. I'll update here if I succeed.
Regards,
Adriano.
The .htaccess
file is included in the reference push service: https://github.com/surrealroad/Safari-Push-Notifications/blob/master/.htaccess it just lives in the root folder (you shouldn't need to edit it if you're using Apache)
Put urlargs
in the WordPress plugin settings page, in the field "Web Service Push URL Arguments Tag" (you wrote on the image that this field was left empty).
You should probably have define('WEBSERVICE_URL', 'https://pizzariameurancho.com.br/site/');
in the config file
Hello. This is not and issue, but rather a request for detailed instructions on how to properly set up the plugin.
Although I've read all the plugin's documentation as also further instructions on https://github.com/surrealroad/Safari-Push-Notifications, I still can't get the plugin to work as intended. I run a seld-managed vps and I use a SSL (HTTPS) server, signed by a recognised authority (Comodo).
I'd really appreciate any help from the experts. P.S: As I'm not a developer I apologize for any noob terms I might be using here...Thanks in advance for your attention.
What I've done until now:
I've successfully created the certificates on Apple's Provisioning Portal following the steps:
Back to the Mac:
On the server side:
openssl x509 -in website_aps_production.cer -inform DER -out apns-cert.pem -outform PEM
- which resulted on a new file named apns-cert.pemDirectory structure and file organization
Finally I created the folders /v1/push/ under my WordPress website root directory on my server and moved all the following files to the /push/ directory. 1 - config.php 2 - createPushPackage.php 3 - index.php 3 - desktop.php 4 - mysqli.inc.php 5 - And the /pushPackage.raw/ folder
My server's directory structure for my WordPress installation is a bit different as follows: I have the WordPress installed under a directory named /site/ which lies on my website's root directory that is /www/, meaning my WP website runs on /www/site/ - This is an ordinary nginx server and I have no issues regarding the ssl certificate from Comodo or the WP website itself.
I confess I'm totally lost here, so after moving the aforementioned files to the server I placed the certificates mysite_webpush.p12 and apns-cert.pem right within the /v1/ directory while the rest of the files I uploaded to the /push/ directory.
Here's a example of the organization I've done.
/www/site/v1/ ---> Here I placed the certificates _mysitewebpush.p12 and apns-cert.pem /www/site/v1/push/ ---> Here I placed all the files config.php, createPushPackage.php, index.php, desktop.php, mysqli.inc.php and the /pushPackage.raw/ folder.
The config.php set up
I've set up the config.php as follows:
Could anyone please point out what I'm missing. This has been a total puzzle to me. Thanks a lot for your attention.
Regards,
Adriano.