Apache index.php - Forbidden您无权访问此服务器上的/

时间:2015-04-23 23:03:54

标签: php apache permissions server local

我最近安装了Apache。我想将我的起始文件从/* Program demonstrates interacting with buttons (GPIO Inputs) */ #include <msp430.h> #define LED_RED_BIT BIT0 #define LED_GREEN_BIT BIT6 #define BUTTON_BIT BIT3 enum led_state { RED_LIGHT = 0, NO_LIGHT_R = 1, /* no light after red led turned off */ GREEN_LIGHT = 2, NO_LIGHT_G = 3 /* no light after green led turned off */ }; enum led_state state; /* current state of LED state machine */ static unsigned char is_button_down; static void init_leds(void) { P1DIR |= LED_GREEN_BIT | LED_RED_BIT; P1OUT &= ~LED_GREEN_BIT; P1OUT |= LED_RED_BIT; state = RED_LIGHT; } static void init_button(void) { /* Since R34 is not installed -- turn on internal pull up for P1.3. * Details: according to LaunchPad User's Guide, section 1.3: * "Pullup resistor R34 and capacitor C24 on P1.3 removed to reduce * the current consumption" */ P1OUT |= BUTTON_BIT; /* the pin is pulled up */ P1REN |= BUTTON_BIT; /* enable pull-up resistor */ is_button_down = 0; } /* Switches to next state of LED state machine */ static void trigger_led_sm(void) { switch (state) { case RED_LIGHT: state = NO_LIGHT_R; P1OUT &= ~LED_RED_BIT; break; case NO_LIGHT_R: state = GREEN_LIGHT; P1OUT |= LED_GREEN_BIT; break; case GREEN_LIGHT: state = NO_LIGHT_G; P1OUT &= ~LED_GREEN_BIT; break; case NO_LIGHT_G: state = RED_LIGHT; P1OUT |= LED_RED_BIT; break; default: /* Reset state machine */ init_leds(); break; } } static void init(void) { init_leds(); init_button(); } static void loop(void) { /* Button polling */ if (P1IN & BUTTON_BIT) { /* button is in released state */ if (is_button_down) { is_button_down = 0; /* event: button up */ } } else { /* button is in pressed state */ if (!is_button_down) { is_button_down = 1; /* event: button down */ trigger_led_sm(); } } } int main(void) { init(); for (;;) loop(); return 0; } 更改为index.html

我创建了一个内容为“index.php”的“.htaccess”文件。

我已更改DirectoryIndex index.php文件,部分现在是:

apache2.conf

但是当我打开服务器时,我收到了“Forbidden ...”消息。

0 个答案:

没有答案